1-新建虚拟环境
conda create -n py36 python=3.6
2-设置pip下载延时时间
pip --default-timeout=1000 install requests
3-根据官网命令下载
![在这里插入图片描述](https://img-blog.csdnimg.cn/62d5a86a2d584e3c895d80927ac06368.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBASmVyZW15IEh1YQ==,size_20,color_FFFFFF,t_70,g_se,x_16)
pip3 install torch==1.10.0+cu102 torchvision==0.11.1+cu102 torchaudio===0.10.0+cu102 -f https://download.pytorch.org/whl/cu102/torch_stable.html
4-测试
from __future__ import print_function
import torch
x = torch.empty(5, 3)
print(x)
5- 结果
tensor(1.00000e-04 *
[[-0.0000, 0.0000, 1.5135],
[ 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000]])