Windows下通过pip安装PyTorch 0.4.0 import报错


问题:通过pip安装PyTorch 0.4.0成功,但是import时报错。

 

  import torch
  File "D:\Python\Python36\lib\site-packages\torch\__init__.py", line 78, in <module>
    from torch._C import *
ImportError: DLL load failed: 找不到指定的模块。

 

解决:

  • put the dll files in Library\bin into a dir
  • append the path of it to the environment variable PATH.

 

参考:

from torch._C import * (ImportError: DLL load failed: The specified module could not be found.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM