Python与PyTorch的版本对应以及pytorch安装问题

Python与PyTorch的版本对应:
https://blog.csdn.net/m0_59118857/article/details/132379012

使用清华源默认安装pytorch为cpu版本,地址为:
https://pypi.tuna.tsinghua.edu.cn/simple/torch/

安装gpu版本的需要使用下面网址:
https://download.pytorch.org/whl/torch/
1.下载torch文件。
2.解压至指定文件夹。
3.打开命令行, cd至解压文件所在的文件夹。
4.使用以下命令安装即可。

或者https://download.pytorch.org/whl/torch_stable.html网页中的版本
pip install torch2.0.0+cu118 torchvision0.15.1+cu118 torchaudio==2.0.1+cu118 -f https://download.pytorch.org/whl/torch_stable.html

你可能感兴趣的:(python,pytorch)