Windows pip 安装 pytorch
Windows pip 安装 pytorch
进入下面网站:
https://pytorch.org/get-started/locally/#windows-pip
选择对应版本,如上图,复制到命令行(用管理员打开)
如:pip install torch1.7.1+cpu torchvision0.8.2+cpu torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
测试:
C:\Users\Administrator>Python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
1.7.1+cpu
>>> import torchvision
>>> print(torchvision.__version__)
0.8.2+cpu