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