通过pip安装PyTorch 0.4.0成功(cpu, not gpu; python3.5; pip):

 

pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp35-cp35m-win_amd64.whl
pip3 install torchvision

 

但是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.

验证by me and:

https://my.oschina.net/lilinzero/blog/1822807

 

相关文章:

  • 2022-12-23
  • 2022-03-03
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
猜你喜欢
  • 2021-12-25
  • 2021-05-05
  • 2021-05-14
  • 2021-09-28
  • 2021-07-31
  • 2021-10-26
  • 2021-11-20
相关资源
相似解决方案