【深度学习】常用PyTorch CUDA版本whl下载及在线安装命令
✨安装非最新版PyTorch
请点击如下链接阅读PyTorch提供的命令
以确认不同版本torch
、torchvision
、torchaudio
对应关系
https://pytorch.org/get-started/previous-versions/
✨whl下载链接
CUDA 11.6
https://download.pytorch.org/whl/cu116
CUDA 11.3
https://download.pytorch.org/whl/cu113
CUDA 10.2
https://download.pytorch.org/whl/cu102
✨在线安装命令
一下提供了常用版本CUDA PyTorch的pip
在线安装命令
其余版本请点击如下链接阅读PyTorch官网指南
https://pytorch.org/get-started/previous-versions/
v1.12.0
# CUDA 11.6
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116
# CUDA 11.3
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113
# CUDA 10.2
pip install torch==1.12.1+cu102 torchvision==0.13.1+cu102 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu102
v1.11.0
# CUDA 11.3
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
# CUDA 10.2
pip install torch==1.11.0+cu102 torchvision==0.12.0+cu102 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu102
v1.10.1
如下命令为官网勘误(截止2023.1.12未修复)
可见安装CUDA 11.1 torch而后所附whl链接为CUDA 11.3
# CUDA 11.1
pip install torch1.10.1+cu111 torchvision0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu113/torch_stable.html
# CUDA 11.3(此条PyTorch官网勘误,此为修正版本)
pip install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu113/torch_stable.html
# CUDA 11.1(此条PyTorch官网勘误,此为修正版本)
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html
# CUDA 10.2
pip install torch==1.10.1+cu102 torchvision==0.11.2+cu102 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu102/torch_stable.html
v1.9.1
# CUDA 11.1
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 10.2
pip install torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
v1.8.2 with LTS support
# NOTE: 'nvidia' channel is required for cudatoolkit 11.1 <br> <b>NOTE:</b> Pytorch LTS version 1.8.2 is only supported for Python <= 3.8.
# CUDA 10.2
pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu102
# CUDA 11.1
pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111
v1.7.1
如下命令疑似官网勘误(截止2023.1.12未修复)
可见命令后面没有加-f
参数来让pip
解析指向存档的链接
# CUDA 10.2
pip install torch1.7.0 torchvision0.8.0 torchaudio==0.7.0
# CUDA 11.0
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 10.2(此条PyTorch官网勘误,此为修正版本)
pip install torch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
v1.6.0
此版本似乎在线安装命令不再可用
如下为PyTorch官方指南提供命令
可前往如下链接下载CUDA 10.2版本的torch 1.6.0
与torchvision 0.7.0
的whl
https://download.pytorch.org/whl/cu102
# CUDA 10.2
pip install torch==1.6.0 torchvision==0.7.0
v1.5.1
此版本似乎在线安装命令不再可用
如下为PyTorch官方指南提供命令
可前往如下链接下载CUDA 10.2版本的torch 1.5.1
与torchvision 0.6.1
的whl
https://download.pytorch.org/whl/cu102
# CUDA 10.2
pip install torch==1.5.1 torchvision==0.6.1
⭐转载请注明出处
本文作者:双份浓缩馥芮白
原文链接:https://www.cnblogs.com/Flat-White/p/17048075.html
版权所有,如需转载请注明出处。