I created a conda environment - testenv2 - installed python/numpy/pandas. Added it as the interpreter in Eclipse project settings and using it to run my test python script. And I am getting the below error. The same test script works fine from command line when I activate the conda environment and run from with in it. It also works from PyCharm. But somehow fails to launch in Eclipse.
Traceback (most recent call last):
File "C:\Data\projects\eclipse-workspace\PythonEclipse\Test.py", line 1, in <module>
import numpy as np
File "C:\Data\devtools\Anaconda3\envs\testenv2\lib\site-packages\numpy\__init__.py", line 140, in <module>
from . import _distributor_init
File "C:\Data\devtools\Anaconda3\envs\testenv2\lib\site-packages\numpy\_distributor_init.py", line 34, in <module>
from . import _mklinit
ImportError: DLL load failed: The specified module could not be found.
If I just run the same test script using my root Conda Python interpreter, it works fine. So it is only when I try to use the environment I created from conda.
Thanks for the help!
Add CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
to your environment variables.
For VSCode, either an .env
file in your workspace folder or "env"
key in launch.json should do the trick.
Source: https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#numpy-mkl-library-load-failed
I have to put following into my path environment variable: E:\program\Anaconda3\Library\bin , otherwise I got the same problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With