“import torch” giving error “from torch._C import *, DLL load failed: The specified module could not be found”

前端 未结 8 794
甜味超标
甜味超标 2020-12-20 12:51

I am currently using Python 3.5.5 on Anaconda and I am unable to import torch. It is giving me the following error in Spyder:

Python 3.5.5 |Anaconda, Inc.|          


        
相关标签:
8条回答
  • 2020-12-20 13:50

    Make sure you installed the right version of pytorch for your enviroment. I had the same problem I was using pytorch on windows but I had the default package installed which was meant for cuda 8. So I reinstalled the pytorch package for cpu which was what I needed.

    0 讨论(0)
  • 2020-12-20 13:51

    I had this similar problem in windows 10...

    Solution:

    • Download win-64/intel-openmp-2018.0.0-8.tar.bz2 from https://anaconda.org/anaconda/intel-openmp/files

    • Extract it and put the dll files in Library\bin into
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin

    • Make sure your cuda directory is added to your %PATH% environment variable

    0 讨论(0)
提交回复
热议问题