Chips when dealing with the error in the subject.
The following error occurred when ptyhon of Anaconda's virtual environment was executed directly on the DOS prompt without performing conda activate etc. in Anaconda.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "common/utils/create_project_schema.py", line 5, in <module>
import numpy as np
File "c:\ProgramData\Anaconda3\envs\hogehoge\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "c:\ProgramData\Anaconda3\envs\hogehoge\lib\site-packages\numpy\core\__init__.py", line 50, 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:\ProgramData\Anaconda3\envs\hogehoge\python.exe"
* The NumPy version is: "1.18.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 cannot be found.
Looking closely at the difference between the environment variable PATH of the Anaconda prompt and the MS DOS prompt, the cause was the following insufficient path.
C:\ProgramData\Anaconda3\envs\<Virtual environment name>\Library\bin
Solved by setting the above in the system environment variable. It may not occur in Python3.6, or it may change depending on how Anaconda is installed, but for your reference.
Recommended Posts