New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing the multiarray numpy extension module failed #9272
Comments
No, shouldn't be affected by other packages. I assume you've checked there's nothing weird in your @matthew-brett ping |
I did There's nothing obvious that I can see on After a bit more playing with
|
Doing some digging with dependency walker, it looks like some files might be failing to load (things like A search of the net shows that these are related to Windows 8 only libraries. I assume these have been linked in accidentally, and numpy isn't desupporting Windows 7? See https://github.com/dotnet/coreclr/issues/65 and https://answers.microsoft.com/en-us/windows/forum/windows_10-files/missing-api-ms-win-core-dlls/d99d1368-0f92-43db-bbdb-7d080f1f96e9 for a couple of links that I found while researching this issue. As a short term fix, I've reverted to numpy 1.12.1 |
I just checked with a colleague. He has the 32-bit build and that seems to work fine. So it may be something specific to the 64-bit binary. |
This is probably Python issue 29943. Extensions built with Python 3.6.1 won't work on 3.6.0. |
@cgohlke - good suggestion. From that bug, we should rebuild the numpy wheel with Python 3.6.0. Appveyor defaults to 3.6.1 : https://www.appveyor.com/docs/build-environment/#python |
Indeed, the release build was on 3.6.1 : https://ci.appveyor.com/project/matthew-brett/numpy-wheels-jc1cl/build/1.0.50/job/71fmdc5c41j4r9y6#L105 |
That bug should only affect packages that reference |
I've just tested on my home PC, which has Python 3.6.1, and numpy 1.13 works fine there. However, my home PC is also Windows 10, and has a lot of other differences, so it's not a perfect test. I'll upgrade my work PC to 3.6.1 tomorrow, and test there. |
On my test machine, I installed numpy in a virtualenv for Python.org 3.6.0, got the crash, then installed Python 3.6.1 and didn't get the crash. |
I can confirm that upgrading to 3.6.1 fixes my issue on the machine I originally had the problem with. Personally, I'm OK for this issue to be closed with "upgrade to 3.6.1" as the resolution, but I'll leave it to you to close it in case you'd prefer to fix the binary to support 3.6.0. |
@matthew-brett I'm going to make a 1.13.1 soon. Are you going to make any modifications to the build? |
@charris - I guess we should build on 3.6.0. I don't think there's any way to do that with Appveyor and the stock Pythons, so we will need to use Conda. I was experimenting with building openblas this time, but that may take a little while to finish up - say a week? |
Can someone confirm whether the bad numpy Windows wheels contain a reference to the symbol Cc @zooba |
Yes, |
huh, I swear I audited numpy to see if it was affected by bpo-29943, and concluded it wasn't. Yet indeed, it looks like some fellow named "njsmith" added those calls last year: #7215 |
Windows 10, Python 3.6, installed using pip and when I import it, it gives me this error.
|
@matthew-brett Any news on this front? I'd like to get 1.13.1 out this week if possible. @njsmith Python 3.6.2 is due out this Friday. Does it fix the problem and is it still on schedule? EDIT: If we do build with Python 3.6.0 or 3.6.2, will the wheels still work with 3.6.1? |
Looks like we dodged that bullet with 1.12.1, but just by a couple of days... |
Yes, building with 3.6.0 or 3.6.2 should be safe, in the sense that the resulting binaries will work on all 3.6.x systems. If we have to, it's also possible to use a preprocessor hack to work around the problem on 3.6.1. I think the appropriate incantation is this one: https://github.com/pandas-dev/pandas/blob/24719672685027710cf432023a7fbc3222b0b05c/pandas/_libs/src/compat_helper.h#L29-L33 |
Just working on mingw OpenBLAS compiles, with @carlkl . Some progress, but can't promise to get it done in the next few days. Use preprocessor hack for now? |
@matthew-brett If 3.6.2 comes out on Friday and is available on appveyor soon after, I'd just as soon go that way. Out of curiosity, what does numpy on window use currently? |
We're using ATLAS at the moment, but performance is pretty bad. It would be good to be able to use OpenBLAS, for performance and for consistency with the Linux builds. I'm not sure how long Appveyor will take before upgrading Python 3.6 to 3.6.2. |
Same issue, numpy v1.13.1 and and python 3.6.1 worked for couple of months, now it just fails. This was based on a conda installation using the windows anaconda navigator. May and June 2017 all code runs fine, then July with an update and and python 3.6.2 "import numpy" does not work anymore. Some further investigation (only based on numpy and python 3.6.2 leads to now the problem is, that there are multiple versions for each of the DLLs (DLL hell) mkl_intel_thread.dll mkl_core.dll libiomp5md.dll each of them different versions, file sizes and versions. Basically the libraries that are loaded refer |
@tobigithub: if you're having trouble loading MKL libraries, then you should take that to the anaconda developers – the numpy project doesn't distribute any binaries that use MKL, and conda has its own ways of trying to avoid DLL hell that we can't really help you with. |
@tobigithub, this seems to be a copy of #6923. You may try out if #6923 (comment) or #6923 (comment) works for you. Another solution is to find and deinstall the software which copied old MKL DLLs into the windows systems folders. You should consider to deinstall the MKL redistributable files as well. |
@njsmith and @carlkl Similar issues with numpy and DLLs: |
@tobigithub: I'm sorry you're having problems, but again, if the problem is caused by the interaction of numpy and MKL, then there is nothing the numpy project can do about it; we provide source code that anyone can use to build numpy linked against any linear algebra library they like, and we provide binaries linked to openblas, but we don't link numpy against MKL ourselves or have any control over how the conda developers set that up. That google search just finds every case that anyone had any kind of problem with numpy binaries – for example, this bug report that you're commenting on was filed to report an incompatibility between the numpy binaries you get with If your RAID or USB driver or whatever is broken in such a way that it breaks other software on your system, then I guess you should file a bug with them? I'm sympathetic to your frustration, but there's literally nothing we can do here to help you, beyond making suggestions to identify the software that's actually at fault. It's not numpy. |
@njsmith ...ok here the solution The solution is indeed related to some DLL depencency issues under WIN with Intel MKL libraries
The quick and dirty solution is to copy all Intel mkl*.dll libraries from the specific environments (env) subfolder (seen at stackoverflow) <\Library\bin> to
now numpy can be imported and runs fine. |
Its a numpy/conda/python issue under windows. Both examples are executed at the same time using the same Anaconda Navigator (conda) version. Installing different python versions and then testing all different dependencies and version numbers can help find the issue. After that code changes have to be investigated. Working
Broken
|
@tobigithub: this is the wrong place to discuss that, as already
explained to you several times. If you have problems with anaconda, you
need to report them to continuum/anaconda.
|
Appveyor issue for Python 3.6.2 is at appveyor/ci#1770 |
The Python 3.6 wheels builders look to be updated to Python 3.6.2, so closing this. |
Compatibility. Python Interpreter's version and numpy's version. |
Was having the same issue with Python 3.6.2 and Numpy/Scipy on Windows 8. Anaconda is not installed as well.
Python 2.7 was present in the PATH variable. Removed it. Then uninstalled existing scipy and numpy modules. Ensure that the commands are executed as Administrator.
Then ran
This resolved the issue! Thanks, |
Hi, During handling of the above exception, another exception occurred: Traceback (most recent call last): Original error was: DLL load failed: The network path was not found. any help is appreciated. |
@KumarNavneet that's a different problem than what this issue is about. The exception message tells you that you have a broken install and should reinstall numpy. If that doesn't work, please open a new issue and tell us exactly how you installed numpy. |
This issue about the 3.6.1 binaries not working with 3.6.0 has definitely been resolved, and people continue to post here other install issues because the importerror looks similar. Hence I'm locking this issue. |
I'm trying to install numpy 1.13.0. My machine is Windows 7, and my Python install is 64-bit Python 3.6.0. I previously had an older version of numpy installed (from Christoph Gohlke's site) but I uninstalled that. I also had a couple of Anaconda installations, but I also uninstalled them. However, when I try to import numpy, I get the above error:
I've checked every other copy of Python on my PC and none of them have numpy installed. I really don't want to uninstall and reinstall my whole Python installation, as there's a lot of packages installed that I'd have to reinstall. None of the other packages, as far as I can tell, are likely to affect numpy (or if they might, they are at the latest version anyway).
What options do I have to work out what's wrong here before I have to clear out every Python install on my machine and do a full reinstall?
The text was updated successfully, but these errors were encountered: