vscode & Anaconda import numpy failed: DLL load failed
Phenomenon:
in Anaconda prompt, import numpy is normal
in vscode, import numpy reports an error: DLL load failed
Error reason:
shell opening failed, resulting in CONDA activate failure. There is no environment, and naturally there is no numpy
Solution:
open the vscodesettings.json file
(type) CTRL + SHIFT + P
(search for:) open settings
(click:) Preferences: Open Settings (JSON)
Add in settings.json:
"terminal.integrated.profiles.windows":{
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
},
"terminal.integrated.defaultProfile.windows":"Command Prompt"
In addition, I also refer to another blog. You need to configure the environment variable
and put the following contents into this computer -> Attribute -> Advanced system settings -> Environment variable -> Path path:
D:\anaconda
D:\anaconda\Scripts
D:\anaconda\Library\bin
D:\anaconda\Library\user\bin
D:\anaconda\Library\mingw-w64\bin
Read More:
- [Solved] Numpy Load Error: DLL load failed while importing _multiarray_umath: Could not be found Module
- [Solved] D2lzh_Pytorch Import error: importerror: DLL load failed while importing
- Import win32API; importerror: DLL load failed: the specified program was not found
- [Solved] OpenCV Import Error: ImportError: numpy.core.multiarray failed to import
- import statsmodels.api as sm Error: ImportError: DLL load failed while importing _arpack: The specified program could not be found.
- Raspberry pie import opencv error: ImportError: numpy.core.multiarray failed to import
- [Solved] mnn Import Error: initMNN: init numpy failed
- Python ImportError: numpy.core.multiarray failed to import
- [Solved] wxauto error: ImportError: DLL load failed while importing win32gui: Can’t find the specified program
- ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.
- DLL load failed while importing rdBase [How to Solve]
- [Solved] DLL load failed while importing _sqlite3: the specified module could not be found.
- [Solved] Sklearn Call Error: DLL load failed while importing _arpack
- TensorFlow Install Error: Could not load dynamic library ‘*****.dll‘; dlerror: ********.dll not found
- Jupyter notebook Failed to Switch to the Virual Environment: DLL load failed python.exe could not find the entry
- Pycharm error: original error was: DLL load failed while importing _multiarray _Umath: the specified module could not be found
- Importerror: DLL load failed: unable to find the specified module in Python
- How to Solve M1 chip import numpy Error
- [Solved] librosa Install Error: ImportError: DLL load failed: Could Not Found
- [Solved] Original error was: DLL load failed while importing _multiarray_umath