pytorch安装失败

不知道为什么pycharm添加库失败,可能是版本问题,

在cmd里执行:

pip3 install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html即可

C:\Users\lenove>pip3 install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.2.0+cpu
  Downloading https://download.pytorch.org/whl/cpu/torch-1.2.0%2Bcpu-cp36-cp36m-win_amd64.whl (89.4MB)
    100% |████████████████████████████████| 89.4MB 12kB/s
Collecting torchvision==0.4.0+cpu
  Downloading https://download.pytorch.org/whl/cpu/torchvision-0.4.0%2Bcpu-cp36-cp36m-win_amd64.whl (684kB)
    100% |████████████████████████████████| 686kB 749kB/s
Requirement already satisfied: numpy in d:\program files\python\python36\lib\site-packages (from torch==1.2.0+cpu)
Requirement already satisfied: pillow>=4.1.1 in d:\program files\python\python36\lib\site-packages (from torchvision==0.4.0+cpu)
Requirement already satisfied: six in d:\program files\python\python36\lib\site-packages (from torchvision==0.4.0+cpu)
Installing collected packages: torch, torchvision
Successfully installed torch-1.2.0+cpu torchvision-0.4.0+cpu

你可能感兴趣的:(pytorch安装失败)