windows cuda9.1 pip安装pytorch 2018-05-29

在官网https://pytorch.org/#pip-install-pytorch上找到步骤:

pip3 install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-win_amd64.whl 
pip3 install torchvision

但安装后import torch报错

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\Koala_FH_SSD\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\__init__.py", line 78, in 
    from torch._C import *
ImportError: DLL load failed: 操作系统无法运行 %1。

解决:https://blog.csdn.net/grllery/article/details/80308122

  • Download win-64/intel-openmp-2018.0.0-8.tar.bz2

  • put the dll files in Library\bin into a dir

  • append the path of it to the environment variable PATH.

这样其实也不能解决,但是在上述路径中直接运行cmd就可以了……不太影响使用

你可能感兴趣的:(windows cuda9.1 pip安装pytorch 2018-05-29)