question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VSCode fails to import numpy with ImportError: DLL load failed: The specified module could not be found.

See original GitHub issue

OS : 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:

    1. 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.
    2. 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:closed
  • Created 4 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

26reactions
namandoctorcommented, Mar 22, 2020

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.

2reactions
Shahrullocommented, Sep 3, 2020

You don’t have to reinstall anything. Just add “C:\Users\username\Anaconda3\Library\bin” to your PATH. It should solve your problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

DLL load failed on Visual Studio Code #16139 - GitHub
VSC is not able to import numpy. I'm using Anaconda3, ... Original error was: DLL load failed: The specified module could not be...
Read more >
DLL load failed: The specific module could not be found ...
Re-install VS Code from Anaconda Navigator; Launch Anaconda Prompt and activate whichever environment I want to use through conda activate myenv ...
Read more >
DLL load failed on Visual Studio Code - Python/Anaconda
Importing the numpy c-extensions failed. ... Original error was: DLL load failed: The specified module could not be found.
Read more >
import numpy could not be resolved vscode - You.com
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 ...
Read more >
Troubleshooting ImportError — NumPy v1.24 Manual
The best thing to do if you see this error is to contact the maintainers of the package that is causing problem so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found