Installing previous versions of PyTorch
我们希望您安装最新版本 ,但为方便起见,下面提供了旧的二进制文件和安装说明.
Commands for Versions >= 1.0.0
v1.2.0
Conda
OSX
# conda
conda install pytorch==1.2.0 torchvision==0.4.0 -c pytorch
Linux and Windows
# CUDA 9.2
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=9.2 -c pytorch
# CUDA 10.0
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch==1.2.0 torchvision==0.4.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.2.0 torchvision==0.4.0
Linux and Windows
# CUDA 10.0
pip install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 9.2
pip install torch==1.2.0+cu92 torchvision==0.4.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html
# CPU only
pip install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
v1.1.0
Conda
OSX
# conda
conda install pytorch==1.1.0 torchvision==0.3.0 -c pytorch
Linux and Windows
# CUDA 9.0
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
# CUDA 10.0
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch-cpu==1.1.0 torchvision-cpu==0.3.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.1.0 torchvision==0.3.0
Linux and Windows
# CUDA 10.0
Download and install wheel from https://download.pytorch.org/whl/cu100/torch_stable.html
# CUDA 9.0
Download and install wheel from https://download.pytorch.org/whl/cu90/torch_stable.html
# CPU only
Download and install wheel from https://download.pytorch.org/whl/cpu/torch_stable.html
v1.0.1
Conda
OSX
# conda
conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
Linux and Windows
# CUDA 9.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
# CUDA 10.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch-cpu==1.0.1 torchvision-cpu==0.2.2 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.0.1 torchvision==0.2.2
Linux and Windows
# CUDA 10.0
Download and install wheel from https://download.pytorch.org/whl/cu100/torch_stable.html
# CUDA 9.0
Download and install wheel from https://download.pytorch.org/whl/cu90/torch_stable.html
# CPU only
Download and install wheel from https://download.pytorch.org/whl/cpu/torch_stable.html
v1.0.0
Conda
OSX
# conda
conda install pytorch==1.0.0 torchvision==0.2.1 -c pytorch
Linux and Windows
# CUDA 10.0
conda install pytorch==1.0.0 torchvision==0.2.1 cuda100 -c pytorch
# CUDA 9.0
conda install pytorch==1.0.0 torchvision==0.2.1 cuda90 -c pytorch
# CUDA 8.0
conda install pytorch==1.0.0 torchvision==0.2.1 cuda80 -c pytorch
# CPU Only
conda install pytorch-cpu==1.0.0 torchvision-cpu==0.2.1 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.0.0 torchvision==0.2.1
Linux and Windows
# CUDA 10.0
Download and install wheel from https://download.pytorch.org/whl/cu100/torch_stable.html
# CUDA 9.0
Download and install wheel from https://download.pytorch.org/whl/cu90/torch_stable.html
# CUDA 8.0
Download and install wheel from https://download.pytorch.org/whl/cu80/torch_stable.html
# CPU only
Download and install wheel from https://download.pytorch.org/whl/cpu/torch_stable.html
Commands for Versions < 1.0.0
Via conda
这应该用于大多数以前的macOS版本安装.
要通过Anaconda或Miniconda安装PyTorch的先前版本,请用所需的版本(即" 0.2.0")替换以下命令中的" 0.4.1".
使用CUDA 9安装
conda install pytorch=0.4.1 cuda90 -c pytorch
or
conda install pytorch=0.4.1 cuda92 -c pytorch
使用CUDA 8安装
conda install pytorch=0.4.1 cuda80 -c pytorch
使用CUDA 7.5安装
conda install pytorch=0.4.1 cuda75 -c pytorch
不使用CUDA进行安装
conda install pytorch=0.4.1 -c pytorch
From source
可以签出较旧版本的PyTorch并进行构建. 您可以使用git tag
标签在PyTorch git存储库中列出标签,并签出特定的git tag
(用所需的版本替换" 0.1.9")
git checkout v0.1.9
按照PyTorch结帐的README.md中的从源安装说明进行操作.
Via pip
从以下html页面下载带有所需版本的whl
文件:
- https://download.pytorch.org/whl/cpu/torch_stable.html#仅CPU构建
- https://download.pytorch.org/whl/cu80/torch_stable.html#CUDA 8.0构建
- https://download.pytorch.org/whl/cu90/torch_stable.html#CUDA 9.0构建
- https://download.pytorch.org/whl/cu92/torch_stable.html#CUDA 9.2构建
- https://download.pytorch.org/whl/cu100/torch_stable.html#CUDA 10.0构建
然后,使用pip install [downloaded file]
注意:大多数pytorch版本仅适用于特定的CUDA版本. 例如pytorch = 1.0.1不适用于CUDA 9.2
(Old) PyTorch Linux binaries compiled with CUDA 7.5
这些早于上面的html页面,并且必须通过下载wheel文件和pip install downloaded_file
进行手动安装.
- cu75/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.3.0.post4-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl
- cu75/torch-0.3.0.post4-cp27-cp27m-linux_x86_64.whl
- cu75/torch-0.2.0.post3-cp36-cp36m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post3-cp27-cp27m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post2-cp36-cp36m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post2-cp35-cp35m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post2-cp27-cp27mu-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post2-cp27-cp27m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post1-cp36-cp36m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post1-cp35-cp35m-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post1-cp27-cp27mu-manylinux1_x86_64.whl
- cu75/torch-0.2.0.post1-cp27-cp27m-manylinux1_x86_64.whl
- cu75/torch-0.1.12.post2-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.12.post2-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.12.post2-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.12.post1-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.12.post1-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.12.post1-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.11.post5-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.11.post5-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.11.post4-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.11.post4-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.11.post4-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.10.post2-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.10.post2-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.10.post2-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.10.post1-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.10.post1-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.10.post1-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.9.post2-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.9.post2-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.9.post2-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.9.post1-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.9.post1-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.9.post1-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.8.post1-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.8.post1-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.8.post1-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.7.post2-cp36-cp36m-linux_x86_64.whl
- cu75/torch-0.1.7.post2-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.7.post2-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.6.post22-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.6.post22-cp27-none-linux_x86_64.whl
- cu75/torch-0.1.6.post20-cp35-cp35m-linux_x86_64.whl
- cu75/torch-0.1.6.post20-cp27-cp27mu-linux_x86_64.whl
Windows binaries
- cpu/torch-1.0.0-cp35-cp35m-win_amd64.whl
- cu80/torch-1.0.0-cp35-cp35m-win_amd64.whl
- cu90/torch-1.0.0-cp35-cp35m-win_amd64.whl
- cu100/torch-1.0.0-cp35-cp35m-win_amd64.whl
- cpu/torch-1.0.0-cp36-cp36m-win_amd64.whl
- cu80/torch-1.0.0-cp36-cp36m-win_amd64.whl
- cu90/torch-1.0.0-cp36-cp36m-win_amd64.whl
- cu100/torch-1.0.0-cp36-cp36m-win_amd64.whl
- cpu/torch-1.0.0-cp37-cp37m-win_amd64.whl
- cu80/torch-1.0.0-cp37-cp37m-win_amd64.whl
- cu90/torch-1.0.0-cp37-cp37m-win_amd64.whl
- cu100/torch-1.0.0-cp37-cp37m-win_amd64.whl
- cpu/torch-0.4.1-cp35-cp35m-win_amd64.whl
- cu80/torch-0.4.1-cp35-cp35m-win_amd64.whl
- cu90/torch-0.4.1-cp35-cp35m-win_amd64.whl
- cu92/torch-0.4.1-cp35-cp35m-win_amd64.whl
- cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl
- cu80/torch-0.4.1-cp36-cp36m-win_amd64.whl
- cu90/torch-0.4.1-cp36-cp36m-win_amd64.whl
- cu92/torch-0.4.1-cp36-cp36m-win_amd64.whl
- cpu/torch-0.4.1-cp37-cp37m-win_amd64.whl
- cu80/torch-0.4.1-cp37-cp37m-win_amd64.whl
- cu90/torch-0.4.1-cp37-cp37m-win_amd64.whl
- cu92/torch-0.4.1-cp37-cp37m-win_amd64.whl
Mac and misc. binaries
对于最新的macOS二进制文件,请使用conda
:
e.g.,
conda install pytorch=0.4.1 cuda90 -c pytorch
conda install pytorch=0.4.1 cuda92 -c pytorch
conda install pytorch=0.4.1 cuda80 -c pytorch
conda install pytorch=0.4.1 -c pytorch
#没有CUDA
- torchvision-0.1.6-py3-none-any.whl
- torchvision-0.1.6-py2-none-any.whl
- torch-1.0.0-cp37-none-macosx_10_7_x86_64.whl
- torch-1.0.0-cp36-none-macosx_10_7_x86_64.whl
- torch-1.0.0-cp35-none-macosx_10_6_x86_64.whl
- torch-1.0.0-cp27-none-macosx_10_6_x86_64.whl
- torch-0.4.0-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.4.0-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.4.0-cp27-none-macosx_10_7_x86_64.whl
- torch-0.3.1-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.3.1-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.3.1-cp27-none-macosx_10_7_x86_64.whl
- torch-0.3.0.post4-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.3.0.post4-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.3.0.post4-cp27-none-macosx_10_7_x86_64.whl
- torch-0.2.0.post3-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.2.0.post3-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.2.0.post3-cp27-none-macosx_10_7_x86_64.whl
- torch-0.2.0.post2-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.2.0.post2-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.2.0.post2-cp27-none-macosx_10_7_x86_64.whl
- torch-0.2.0.post1-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.2.0.post1-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.2.0.post1-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.12.post2-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.12.post2-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.12.post1-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.12.post1-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.1.12.post1-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.11.post5-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.11.post5-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.1.11.post5-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.11.post4-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.11.post4-cp35-cp35m-macosx_10_7_x86_64.whl
- torch-0.1.11.post4-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.10.post1-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.10.post1-cp35-cp35m-macosx_10_6_x86_64.whl
- torch-0.1.10.post1-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.9.post2-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.9.post2-cp35-cp35m-macosx_10_6_x86_64.whl
- torch-0.1.9.post2-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.9.post1-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.9.post1-cp35-cp35m-macosx_10_6_x86_64.whl
- torch-0.1.9.post1-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.8.post1-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.8.post1-cp35-cp35m-macosx_10_6_x86_64.whl
- torch-0.1.8.post1-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.7.post2-cp36-cp36m-macosx_10_7_x86_64.whl
- torch-0.1.7.post2-cp35-cp35m-macosx_10_6_x86_64.whl
- torch-0.1.7.post2-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.6.post22-cp35-cp35m-macosx_10_6_x86_64.whl
- torch-0.1.6.post22-cp27-none-macosx_10_7_x86_64.whl
- torch-0.1.6.post20-cp35-cp35m-linux_x86_64.whl
- torch-0.1.6.post20-cp27-cp27mu-linux_x86_64.whl
- torch-0.1.6.post17-cp35-cp35m-linux_x86_64.whl
- torch-0.1.6.post17-cp27-cp27mu-linux_x86_64.whl
- torch-0.1-cp35-cp35m-macosx_10_6_x86_64.whl
- torch-0.1-cp27-cp27m-macosx_10_6_x86_64.whl
- torch_cuda80-0.1.6.post20-cp35-cp35m-linux_x86_64.whl
- torch_cuda80-0.1.6.post20-cp27-cp27mu-linux_x86_64.whl
- torch_cuda80-0.1.6.post17-cp35-cp35m-linux_x86_64.whl
- torch_cuda80-0.1.6.post17-cp27-cp27mu-linux_x86_64.whl