VSCode fails to import numpy with ImportError: DLL load failed: The specified module could not be found.
See original GitHub issueOS : Windows 10 Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 01:31:54) [MSC v.1916 64 bit (AMD64)] on win32
Im using vs code, but no conda. and i read some existing issue that same with me but dint work for me.
I have tried reinstall using both pip install numpy and also the package from https://www.lfd.uci.edu/~gohlke/pythonlibs/ but both give me the same error.
numpy: (1.17.3+mkl) scipy: (1.3.1)
The ouput from my console:
import numpy Traceback (most recent call last): File “C:\Users\Feng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\numpy\core_init_.py”, line 17, in <module> from . import multiarray File “C:\Users\Feng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\numpy\core\multiarray.py”, line 14, in <module> from . import overrides File “C:\Users\Feng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\numpy\core\overrides.py”, line 7, in <module> from numpy.core._multiarray_umath import ( ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “C:\Users\Feng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\numpy_init_.py”, line 142, in <module> from . import core File “C:\Users\Feng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\numpy\core_init_.py”, line 47, in <module> raise ImportError(msg) ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy c-extensions failed.
-
Try uninstalling and reinstalling numpy.
-
If you have already done that, then:
- Check that you expected to use Python3.7 from “C:\Users\Feng\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe”, and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version “1.17.3” you’re trying to use.
- If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
-
If you’re working with a numpy git repository, try
git clean -xdf
(removes all files not under version control) and rebuild numpy.
Note: this error has many possible causes, so please don’t comment on an existing issue about this - open a new one instead.
Original error was: DLL load failed: The specified module could not be found.
%path% C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin; C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp; C:\Program Files (x86)\Common Files\Oracle\Java\javapath; C:\Program Files (x86)\Intel\Intel® Management Engine Components\iCLS; C:\Program Files\Intel\Intel® Management Engine Components\iCLS; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0; C:\Windows\System32\OpenSSH; C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL; C:\Program Files\Intel\Intel® Management Engine Components\DAL; C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT; C:\Program Files\Intel\Intel® Management Engine Components\IPT; C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\Feng\poppler-0.68.0\bin; C:\Users\Feng\AppData\Roaming\local\bin; C:\Program Files\Git\cmd; C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\WINDOWS\System32\WindowsPowerShell\v1.0; C:\WINDOWS\System32\OpenSSH;C:\MinGW\bin; C:\Program Files (x86)\Graphviz2.38\bin\dot.exe; C:\Program Files\Microsoft VS Code\bin; C:\Users\Feng\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts; C:\Users\Feng\AppData\Local\Microsoft\WindowsApps; C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.4.0; C:\Users\Feng\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0; C:\Users\Feng\AppData\Local\Microsoft\WindowsApps; C:\Users\Feng\poppler-0.68.0\bin; C:\Program Files (x86)\Graphviz2.38\bin
==============================================================
Can someone help me pls… Sry for my poor english.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (1 by maintainers)
Add the python library path to PATH in user variables. As I am using Anaconda, for me, adding: “C:\Users\naman\Anaconda3\Library\bin” solved the problem.
You don’t have to reinstall anything. Just add “C:\Users\username\Anaconda3\Library\bin” to your PATH. It should solve your problem