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

前端 未结 8 792
甜味超标
甜味超标 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:26

    Had the same problem and fixed it by re-installing numpy with mkl (Intel's math kernel library) https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

    Download the right .whl for your machine. For me it was numpy‑1.14.5+mkl‑cp36‑cp36m‑win_amd64.whl (python 3.6, windows, 64-bit) and then install using pip.

    pip install numpy‑1.14.5+mkl‑cp36‑cp36m‑win_amd64.whl
    

提交回复
热议问题