Torch is installed in the environment, but still appears - ImportError: DLL load failed: The specified module cannot be found.
ImportError: DLL load failed: 找不到指定的模块。)
Traceback (most recent call last): File “E:/mycode/SmartToolLibary_v1.0/test.py”, line 1, in import torch File “D:\Program Files\anaconda3\lib\site-packages\torch_ init_.py”, line 81, in ctypes.CDLL(dll) File "D:\Program …
ImportError: DLL load failed: The specified module could not be found .
the reason
-
Maybe you have installed more than two versions. For example, 1.3.1 and 1.5.1
solutions: update to one$ conda update pytorch
Or uninstall one:
conda uninstall XXX
- The pytorch development team believes that there may also be a torch folder at present, which is mistakenly regarded as the folder where the torch library is located.
Solution: the current folder cannot be called torch