-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ImportError: DLL load failed for numpy 1.16.1 #12957
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
Comments
There is a difference between the location of the extra support libraries supplied with anaconda and those supplied with stock numpy that you get from
Please report back to us if that directory exists and if changing the path succeeds, it indicates the code in Anaconda places the extra dlls in |
You method indeed works! I will try a fresh install with a shorter initial path to verify your theroy in about an hour. Side question: Shouldn't there be more dlls in that path? I want to use OpenMP and mkl with pytorch, not openblas... |
If you want to use mkl, then use conda, not pip |
sorry, use |
Ok I shortened my PATH and it's still not working with "pip install numpy". My PATH is still long, but I can't remove anything from it anymore, because other tools need it like it is. Why is there no conda numpy 1.16.1? Thanks for your help, mate! |
(test37) D:\test>pip install intel-numpy
"conda install numpy" gives me 1.15.4 which is working fine. |
@mattip THANK YOU VERY MUCH |
Maybe we should statically link and alleviate the need for this path mangling |
Could this PATH editing issue in numpy for newer python versions have the same reason? |
I got the same type of error for scipy as well. After creating an env using conda I had to uninstall using pip and install using conda for all packages that created an issue for me. That worked for me, although it's not an ideal solution since this was a very manual operation. |
@djdookie: just to be sure what worked and what didn't. You have the dll in Edit: note that the new environment would have a different path-to-dll |
It seems this is a broken ananconda, see this issue ContinuumIO/anaconda-issues#10628 |
Closing. Anaconda seems to have fixed the issue that caused this. |
I just downloaded the newest windows version of conda for python3.7 for windows 7 and got this issue. Can we reopen? |
I solve the problem. It was a path issue as I was using WingIDE. I used these instructions to fix Specifically, I opened the anaconda command prompt and did "PATH" and copied it into my wing path for my project. For reference, my PATH=C:\Users\xx\AppData\Local\Continuum\anaconda3;C:\Users\xx\AppData\Local\Continuum\anaconda3\Library\mingw-w64\bin;C:\Users\xx\AppData\Local\Continuum\anaconda3\Library\usr\bin;C:\Users\xx\AppData\Local\Continuum\anaconda3\Library\bin;C:\Users\xx\AppData\Local\Continuum\anaconda3\Scripts;C:\Users\xx\AppData\Local\Continuum\anaconda3\bin;C:\Users\xx\AppData\Local\Continuum\anaconda3\condabin; |
I just went to the folder and deleted one. That seems to have fixed it. |
This also seems to happen in Jupyter if you do not "conda activate" the environment that you will be using PRIOR to starting Jupyter. |
And it also happens in VS Code if you don't "conda activate" the environment PRIOR to starting vs code. If I use "code ." in the conda environment prompt, it works. |
This worked for me. And the issue seems to particularly in jupyter lab |
I solved my issues with Numpy DLL load issues by replacing Anaconda3 with WinPython. |
I have this issue with WinPaython |
I have a similar problem: File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\numpy\__init__.py", line 140, in <module>
from . import core
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\numpy\core\__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.7 from "C:\Users\User\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe"
* The NumPy version is: "1.19.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed: The specified module could not be found. Does anyone have a suggestion on how to solve? Thanks! |
I'm having the same issue. This happened after installing scipy. How do I edit my PATH variable? |
The only thing that solved this issue for me was to upgrade the libaries in this order. Uninstalling them and reinstalling them didn't work, I had to use |
Uh oh!
There was an error while loading. Please reload this page.
Create fresh virtual env with Anaconda Navigator 1.9.6 under Windows 10, selecting Python 3.7, naming python37
In the console of VSCode:
(same with parameter --no-cache-dir)
All advices, reinstallations via pip and conda, or different numpy versions (e.g. 1.15.4) didn't solve this issue for me.
If I do multiple pip uninstall numpy until there is no numpy left, and then do a conda install numpy, importing numpy interestingly works (in 1.15.4).
A conda install numpy does the following:
What's missing for the pip way?
Any ideas?
The text was updated successfully, but these errors were encountered: