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

亦凉 2022-01-22 05:47 445阅读 0赞

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

发表评论

表情:
评论列表 (有 0 条评论,445人围观)

还没有评论,来说两句吧...

相关阅读