您的位置:首页 > 大数据 > 人工智能

Win10下pip安装PyTorch后出现“from torch._C import * ImportError: DLL load failed: 找不到指定的模块”错误的解决办法

2019-04-17 15:26 726 查看

亲测可行(之前找到的方法:添加PATH,对我不管用。例外在此之前装过0.4.1版本的开域导入, 后来更新成0.4.0 就报错了)

博主今天安装遇到了import问题记录一下方便以后参考。

[code]Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\__init__.py", line 78, in <module>
    from torch._C import *
ImportError: DLL load failed: 找不到指定的模块。

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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐