from torch._C import * ImportError: DLL load failed解决方法

 from torch._C import * ImportError: DLL load failed解决方法


 import torch会出现如下错误:

 import torch
  File "D:\ProgramData\Anaconda3\envs\pytorch-py36\lib\site-packages\torch\__init__.py", line 79, in
    from torch._C import *
ImportError: DLL load failed: 找不到指定的程序。

网上解决方法众说纷纭,我的解决方法是:发现是Python版本问题:

https://github.com/pytorch/pytorch/issues/4518

This also worked for me.
Same for python 3.6: Using newest python 3.6.8 gives the same error
conda install python==3.6.7 works

解决方法:

conda install python==3.6.7

你可能感兴趣的:(from,torch._C,from,torch._C,import,*,ImportError:,DLL,load,failed,经验分享,Pytorch)