It was caused by the missing of some of the dependencies: mkl, mkl-fft, intel-openmp and VC 2017 Redist.
For conda packages:
conda install mkl mkl-fft intel-openmp numpy
# If package not found, do this
conda update condaFor wheel packages:
pip install mkl mkl-fft intel-openmp numpyAnd then download VC 2017 Redist and install it.
A reboot may be required for the libraries to take effect.
If this persists, it may be related to your environmental variables, such as PATH.
Make sure it is not broken and at least point to the following locations:
[PythonRoot]
[PythonRoot]\Library\bin
[PythonRoot]\Scripts
[PythonRoot]\bin
%SYSTEMROOT%P.S:
#7579 ImportError: DLL load failed: The operating system cannot run %1. does not seem to be the same issue with this.
It is related to Anaconda. Fix command: conda install -c defaults intel-openmp -f.
If you want to help us, please provide us the logs with python -v -c 'import torch' and the result of the following code:
# pip install psutil first
import psutil, os
p = psutil.Process( os.getpid() )
for dll in p.memory_maps():
print(dll.path)
Dear manager,
I also met this same problem.(from torch._C import * (ImportError: DLL load failed: The specified module could not be found )
But as your guide above, I did as below and then finally could run Yolov3-python version.
I did below as you said above.
pip install mkl
pip install mkl-fft
-> ,where following error were shown, but i ignored / proceed next
mkl-random 1.0.0.8 requires intel-numpy, which is not installed.
mkl-fft 1.0.0.17 requires intel-numpy, which is not installed.
pip install numpy
pip install pandas
and then installed "VC 2017 Redist" as you said.
at last, path was important.
I added "C:\Users\WIN10\AppData\Local\Programs\Python\Python36\Library\bin" in current path.
so PATH became like below.
PATH=C:\Users\WIN10\AppData\Local\Programs\Python\Python36\Scripts;C:\Users\WIN10\AppData\Local\Programs\Python\Python36;C:\Users\WIN10\AppData\Local\Programs\Python\Python36\Lib\site-packages\torch\lib;C:\Users\WIN10\AppData\Local\Programs\Python\Python36\Library\bin
and then I tested 'torch' again and no error.
FYI, My- environment was ...
python : 3.6.4
pythorch : 0.4.0
cv: 3.4.1
os : windows 10 (cpu only)
anaconda : I did not install. (because its installation size was too big)
Thanks
Best Regards,
Tommy