admin管理员组文章数量:1651576
Windows 下通过 conda 安装 pytorch 后 ,
import torch 报错 :
** from torch._C import ***
ImportError: DLL load failed: 操作系统无法运行 %1。
解决办法:
- Download win-64/intel-openmp-2018.0.0-8.tar.bz2
- 上面的链接有时候下载比较慢,这里有网盘版本:https://download.csdn/download/xrinosvip/10580839
- unzip the downloaded file, and put the dll files in
Library\bin
into Python dll path: C:\Users\username\AppData\Local\Programs\Python\Python36\DLLs(you can locate python path usingwhere python
command) - 例如:我的python 的安装路径:D:\ProgramData\Anaconda3,就把 两个 .dell 文件复制到:D:\ProgramData\Anaconda3\Library\bin(该文件夹下有同名的文件,最好先备份原来的 两个 .dell 文件)
- check if Python path in environment variables配置python的环境变量,我的电脑——属性——高级系统设置——高级——环境变量——双击进入path——添加,将第第三步的DLLS文件夹路径添加到环境变量中即可。
- 重启python,这一步很关键
若上面的方法解决不了,请参考我的另一篇博客:
https://blog.csdn/xrinosvip/article/details/81383399
Reference:
https://blog.csdn/deeplearningfeng/article/details/80736151
本文标签: 报错操作系统importtorchWindows
版权声明:本文标题:windows 下import torch 报错:ImportError: DLL load failed: 操作系统无法运行 %1。 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1725034896a1003356.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论