当前位置:   article > 正文

[pytorch]pytorch安装_pytorch 2.1.0

pytorch 2.1.0

v2.1.0

Conda
OSX
  1. # conda
  2. conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 -c pytorch
Linux and Windows
  1. # CUDA 11.8
  2. conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=11.8 -c pytorch -c nvidia
  3. # CUDA 12.1
  4. conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=12.1 -c pytorch -c nvidia
  5. # CPU Only
  6. conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0
Linux and Windows
  1. # ROCM 5.6 (Linux only)
  2. pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/rocm5.6
  3. # CUDA 11.8
  4. pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
  5. # CUDA 12.1
  6. pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121
  7. # CPU only
  8. pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu

v2.0.1

Conda
OSX
  1. # conda
  2. conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 -c pytorch
Linux and Windows
  1. # CUDA 11.7
  2. conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.7 -c pytorch -c nvidia
  3. # CUDA 11.8
  4. conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
  5. # CPU Only
  6. conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 cpuonly -c pytorch
Wheel
OSX
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
Linux and Windows
  1. # ROCM 5.4.2 (Linux only)
  2. pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/rocm5.4.2
  3. # CUDA 11.7
  4. pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
  5. # CUDA 11.8
  6. pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
  7. # CPU only
  8. pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cpu

v2.0.0

Conda
OSX
  1. # conda
  2. conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 -c pytorch
Linux and Windows
  1. # CUDA 11.7
  2. conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.7 -c pytorch -c nvidia
  3. # CUDA 11.8
  4. conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia
  5. # CPU Only
  6. conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1
Linux and Windows
  1. # ROCM 5.4.2 (Linux only)
  2. pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/rocm5.4.2
  3. # CUDA 11.7
  4. pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1
  5. # CUDA 11.8
  6. pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
  7. # CPU only
  8. pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cpu

v1.13.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 -c pytorch
Linux and Windows
  1. # CUDA 11.6
  2. conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia
  3. # CUDA 11.7
  4. conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
  5. # CPU Only
  6. conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1
Linux and Windows
  1. # ROCM 5.2 (Linux only)
  2. pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2
  3. # CUDA 11.6
  4. pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
  5. # CUDA 11.7
  6. pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
  7. # CPU only
  8. pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu

v1.13.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 -c pytorch
Linux and Windows
  1. # CUDA 11.6
  2. conda install pytorch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 pytorch-cuda=11.6 -c pytorch -c nvidia
  3. # CUDA 11.7
  4. conda install pytorch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 pytorch-cuda=11.7 -c pytorch -c nvidia
  5. # CPU Only
  6. conda install pytorch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0
Linux and Windows
  1. # ROCM 5.2 (Linux only)
  2. pip install torch==1.13.0+rocm5.2 torchvision==0.14.0+rocm5.2 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/rocm5.2
  3. # CUDA 11.6
  4. pip install torch==1.13.0+cu116 torchvision==0.14.0+cu116 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu116
  5. # CUDA 11.7
  6. pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
  7. # CPU only
  8. pip install torch==1.13.0+cpu torchvision==0.14.0+cpu torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cpu

v1.12.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
  5. # CUDA 11.6
  6. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6 -c pytorch -c conda-forge
  7. # CPU Only
  8. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1
Linux and Windows
  1. # ROCM 5.1.1 (Linux only)
  2. pip install torch==1.12.1+rocm5.1.1 torchvision==0.13.1+rocm5.1.1 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/rocm5.1.1
  3. # CUDA 11.6
  4. 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
  5. # CUDA 11.3
  6. pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
  7. # CUDA 10.2
  8. 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
  9. # CPU only
  10. pip install torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cpu

v1.12.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
  5. # CUDA 11.6
  6. conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.6 -c pytorch -c conda-forge
  7. # CPU Only
  8. conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0
Linux and Windows
  1. # ROCM 5.1.1 (Linux only)
  2. pip install torch==1.12.0+rocm5.1.1 torchvision==0.13.0+rocm5.1.1 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/rocm5.1.1
  3. # CUDA 11.6
  4. pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
  5. # CUDA 11.3
  6. 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
  7. # CUDA 10.2
  8. pip install torch==1.12.0+cu102 torchvision==0.13.0+cu102 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu102
  9. # CPU only
  10. pip install torch==1.12.0+cpu torchvision==0.13.0+cpu torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cpu

v1.11.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
  5. # CPU Only
  6. conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0
Linux and Windows
  1. # ROCM 4.5.2 (Linux only)
  2. pip install torch==1.11.0+rocm4.5.2 torchvision==0.12.0+rocm4.5.2 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/rocm4.5.2
  3. # CUDA 11.3
  4. 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
  5. # CUDA 10.2
  6. 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
  7. # CPU only
  8. pip install torch==1.11.0+cpu torchvision==0.12.0+cpu torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cpu

v1.10.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge
  5. # CPU Only
  6. conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1
Linux and Windows
  1. # ROCM 4.2 (Linux only)
  2. pip install torch==1.10.1+rocm4.2 torchvision==0.11.2+rocm4.2 torchaudio==0.10.1 -f https://download.pytorch.org/whl/rocm4.2/torch_stable.html
  3. # ROCM 4.1 (Linux only)
  4. pip install torch==1.10.1+rocm4.1 torchvision==0.11.2+rocm4.1 torchaudio==0.10.1 -f https://download.pytorch.org/whl/torch_stable.html
  5. # ROCM 4.0.1 (Linux only)
  6. pip install torch==1.10.1+rocm4.0.1 torchvision==0.10.2+rocm4.0.1 torchaudio==0.10.1 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 11.1
  8. 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
  9. # CUDA 10.2
  10. 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
  11. # CPU only
  12. pip install torch==1.10.1+cpu torchvision==0.11.2+cpu torchaudio==0.10.1 -f https://download.pytorch.org/whl/cpu/torch_stable.html

v1.10.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forge
  5. # CPU Only
  6. conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0
Linux and Windows
  1. # ROCM 4.2 (Linux only)
  2. pip install torch==1.10.0+rocm4.2 torchvision==0.11.0+rocm4.2 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
  3. # ROCM 4.1 (Linux only)
  4. pip install torch==1.10.0+rocm4.1 torchvision==0.11.0+rocm4.1 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
  5. # ROCM 4.0.1 (Linux only)
  6. pip install torch==1.10.0+rocm4.0.1 torchvision==0.10.1+rocm4.0.1 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 11.1
  8. pip install torch==1.10.0+cu111 torchvision==0.11.0+cu111 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
  9. # CUDA 10.2
  10. pip install torch==1.10.0+cu102 torchvision==0.11.0+cu102 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
  11. # CPU only
  12. pip install torch==1.10.0+cpu torchvision==0.11.0+cpu torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html

v1.9.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.9.1 torchvision==0.10.1 torchaudio==0.9.1 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.9.1 torchvision==0.10.1 torchaudio==0.9.1 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.9.1 torchvision==0.10.1 torchaudio==0.9.1 cudatoolkit=11.3 -c pytorch -c conda-forge
  5. # CPU Only
  6. conda install pytorch==1.9.1 torchvision==0.10.1 torchaudio==0.9.1 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.9.1 torchvision==0.10.1 torchaudio==0.9.1
Linux and Windows
  1. # ROCM 4.2 (Linux only)
  2. pip install torch==1.9.1+rocm4.2 torchvision==0.10.1+rocm4.2 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
  3. # ROCM 4.1 (Linux only)
  4. pip install torch==1.9.1+rocm4.1 torchvision==0.10.1+rocm4.1 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
  5. # ROCM 4.0.1 (Linux only)
  6. pip install torch==1.9.1+rocm4.0.1 torchvision==0.10.1+rocm4.0.1 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 11.1
  8. 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
  9. # CUDA 10.2
  10. pip install torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
  11. # CPU only
  12. pip install torch==1.9.1+cpu torchvision==0.10.1+cpu torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

v1.9.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=11.3 -c pytorch -c conda-forge
  5. # CPU Only
  6. conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0
Linux and Windows
  1. # ROCM 4.2 (Linux only)
  2. pip install torch==1.9.0+rocm4.2 torchvision==0.10.0+rocm4.2 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  3. # ROCM 4.1 (Linux only)
  4. pip install torch==1.9.0+rocm4.1 torchvision==0.10.0+rocm4.1 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  5. # ROCM 4.0.1 (Linux only)
  6. pip install torch==1.9.0+rocm4.0.1 torchvision==0.10.0+rocm4.0.1 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 11.1
  8. pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  9. # CUDA 10.2
  10. pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  11. # CPU only
  12. pip install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

v1.8.2 with LTS support

Conda
OSX

macOS is currently not supported for LTS.

Linux and Windows
  1. # CUDA 10.2
  2. # NOTE: PyTorch LTS version 1.8.2 is only supported for Python <= 3.8.
  3. conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-lts
  4. # CUDA 11.1 (Linux)
  5. # 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.
  6. conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c nvidia
  7. # CUDA 11.1 (Windows)
  8. # 'conda-forge' channel is required for cudatoolkit 11.1 <br> <b>NOTE:</b> Pytorch LTS version 1.8.2 is only supported for Python <= 3.8.
  9. conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c conda-forge
  10. # CPU Only
  11. # Pytorch LTS version 1.8.2 is only supported for Python <= 3.8.
  12. conda install pytorch torchvision torchaudio cpuonly -c pytorch-lts
  13. # ROCM5.x
  14. Not supported in LTS.
Wheel
OSX

macOS is currently not supported in LTS.

Linux and Windows
  1. # CUDA 10.2
  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
  3. # CUDA 11.1
  4. 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
  5. # CPU Only
  6. 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/cpu
  7. # ROCM5.x
  8. Not supported in LTS.

v1.8.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.3
  4. conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=11.3 -c pytorch -c conda-forge
  5. # CPU Only
  6. conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1
Linux and Windows
  1. # ROCM 4.0.1 (Linux only)
  2. pip install torch==1.8.1+rocm4.0.1 torchvision==0.9.1+rocm4.0.1 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
  3. # ROCM 3.10 (Linux only)
  4. pip install torch==1.8.1+rocm3.10 torchvision==0.9.1+rocm3.10 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
  5. # CUDA 11.1
  6. pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 10.2
  8. pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
  9. # CUDA 10.1
  10. pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
  11. # CPU only
  12. pip install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

v1.8.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 -c pytorch
Linux and Windows
  1. # CUDA 10.2
  2. conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.2 -c pytorch
  3. # CUDA 11.1
  4. conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
  5. # CPU Only
  6. conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0
Linux and Windows
  1. # RocM 4.0.1 (Linux only)
  2. pip install torch -f https://download.pytorch.org/whl/rocm4.0.1/torch_stable.html
  3. pip install ninja
  4. pip install 'git+https://github.com/pytorch/vision.git@v0.9.0'
  5. # CUDA 11.1
  6. pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 10.2
  8. pip install torch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0
  9. # CPU only
  10. pip install torch==1.8.0+cpu torchvision==0.9.0+cpu torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html

v1.7.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 -c pytorch
Linux and Windows
  1. # CUDA 9.2
  2. conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=9.2 -c pytorch
  3. # CUDA 10.1
  4. conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch
  5. # CUDA 10.2
  6. conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.2 -c pytorch
  7. # CUDA 11.0
  8. conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
  9. # CPU Only
  10. conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2
Linux and Windows
  1. # CUDA 11.0
  2. 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
  3. # CUDA 10.2
  4. pip install torch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2
  5. # CUDA 10.1
  6. pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 9.2
  8. pip install torch==1.7.1+cu92 torchvision==0.8.2+cu92 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
  9. # CPU only
  10. pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

v1.7.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 -c pytorch
Linux and Windows
  1. # CUDA 9.2
  2. conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=9.2 -c pytorch
  3. # CUDA 10.1
  4. conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.1 -c pytorch
  5. # CUDA 10.2
  6. conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.2 -c pytorch
  7. # CUDA 11.0
  8. conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch
  9. # CPU Only
  10. conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0
Linux and Windows
  1. # CUDA 11.0
  2. pip install torch==1.7.0+cu110 torchvision==0.8.0+cu110 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
  3. # CUDA 10.2
  4. pip install torch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0
  5. # CUDA 10.1
  6. pip install torch==1.7.0+cu101 torchvision==0.8.0+cu101 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CUDA 9.2
  8. pip install torch==1.7.0+cu92 torchvision==0.8.0+cu92 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
  9. # CPU only
  10. pip install torch==1.7.0+cpu torchvision==0.8.0+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

v1.6.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch
Linux and Windows
  1. # CUDA 9.2
  2. conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=9.2 -c pytorch
  3. # CUDA 10.1
  4. conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch
  5. # CUDA 10.2
  6. conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.2 -c pytorch
  7. # CPU Only
  8. conda install pytorch==1.6.0 torchvision==0.7.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.6.0 torchvision==0.7.0
Linux and Windows
  1. # CUDA 10.2
  2. pip install torch==1.6.0 torchvision==0.7.0
  3. # CUDA 10.1
  4. pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
  5. # CUDA 9.2
  6. pip install torch==1.6.0+cu92 torchvision==0.7.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CPU only
  8. pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

v1.5.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.5.1 torchvision==0.6.1 -c pytorch
Linux and Windows
  1. # CUDA 9.2
  2. conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=9.2 -c pytorch
  3. # CUDA 10.1
  4. conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.1 -c pytorch
  5. # CUDA 10.2
  6. conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.2 -c pytorch
  7. # CPU Only
  8. conda install pytorch==1.5.1 torchvision==0.6.1 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.5.1 torchvision==0.6.1
Linux and Windows
  1. # CUDA 10.2
  2. pip install torch==1.5.1 torchvision==0.6.1
  3. # CUDA 10.1
  4. pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
  5. # CUDA 9.2
  6. pip install torch==1.5.1+cu92 torchvision==0.6.1+cu92 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CPU only
  8. pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html

v1.5.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.5.0 torchvision==0.6.0 -c pytorch
Linux and Windows
  1. # CUDA 9.2
  2. conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=9.2 -c pytorch
  3. # CUDA 10.1
  4. conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.1 -c pytorch
  5. # CUDA 10.2
  6. conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.2 -c pytorch
  7. # CPU Only
  8. conda install pytorch==1.5.0 torchvision==0.6.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.5.0 torchvision==0.6.0
Linux and Windows
  1. # CUDA 10.2
  2. pip install torch==1.5.0 torchvision==0.6.0
  3. # CUDA 10.1
  4. pip install torch==1.5.0+cu101 torchvision==0.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
  5. # CUDA 9.2
  6. pip install torch==1.5.0+cu92 torchvision==0.6.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html
  7. # CPU only
  8. pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

v1.4.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.4.0 torchvision==0.5.0 -c pytorch
Linux and Windows
  1. # CUDA 9.2
  2. conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=9.2 -c pytorch
  3. # CUDA 10.1
  4. conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
  5. # CPU Only
  6. conda install pytorch==1.4.0 torchvision==0.5.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==1.4.0 torchvision==0.5.0
Linux and Windows
  1. # CUDA 10.1
  2. pip install torch==1.4.0 torchvision==0.5.0
  3. # CUDA 9.2
  4. pip install torch==1.4.0+cu92 torchvision==0.5.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html
  5. # CPU only
  6. pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

v1.2.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.2.0 torchvision==0.4.0 -c pytorch
Linux and Windows
  1. # CUDA 9.2
  2. conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=9.2 -c pytorch
  3. # CUDA 10.0
  4. conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
  5. # CPU Only
  6. 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
  1. # CUDA 10.0
  2. pip install torch==1.2.0 torchvision==0.4.0
  3. # CUDA 9.2
  4. pip install torch==1.2.0+cu92 torchvision==0.4.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html
  5. # CPU only
  6. 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
  1. # conda
  2. conda install pytorch==1.1.0 torchvision==0.3.0 -c pytorch
Linux and Windows
  1. # CUDA 9.0
  2. conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
  3. # CUDA 10.0
  4. conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch
  5. # CPU Only
  6. 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
  1. # CUDA 10.0
  2. Download and install wheel from https://download.pytorch.org/whl/cu100/torch_stable.html
  3. # CUDA 9.0
  4. Download and install wheel from https://download.pytorch.org/whl/cu90/torch_stable.html
  5. # CPU only
  6. Download and install wheel from https://download.pytorch.org/whl/cpu/torch_stable.html

v1.0.1

Conda
OSX
  1. # conda
  2. conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
Linux and Windows
  1. # CUDA 9.0
  2. conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
  3. # CUDA 10.0
  4. conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
  5. # CPU Only
  6. 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
  1. # CUDA 10.0
  2. Download and install wheel from https://download.pytorch.org/whl/cu100/torch_stable.html
  3. # CUDA 9.0
  4. Download and install wheel from https://download.pytorch.org/whl/cu90/torch_stable.html
  5. # CPU only
  6. Download and install wheel from https://download.pytorch.org/whl/cpu/torch_stable.html

v1.0.0

Conda
OSX
  1. # conda
  2. conda install pytorch==1.0.0 torchvision==0.2.1 -c pytorch
Linux and Windows
  1. # CUDA 10.0
  2. conda install pytorch==1.0.0 torchvision==0.2.1 cuda100 -c pytorch
  3. # CUDA 9.0
  4. conda install pytorch==1.0.0 torchvision==0.2.1 cuda90 -c pytorch
  5. # CUDA 8.0
  6. conda install pytorch==1.0.0 torchvision==0.2.1 cuda80 -c pytorch
  7. # CPU Only
  8. 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
  1. # CUDA 10.0
  2. Download and install wheel from https://download.pytorch.org/whl/cu100/torch_stable.html
  3. # CUDA 9.0
  4. Download and install wheel from https://download.pytorch.org/whl/cu90/torch_stable.html
  5. # CUDA 8.0
  6. Download and install wheel from https://download.pytorch.org/whl/cu80/torch_stable.html
  7. # CPU only
  8. Download and install wheel from https://download.pytorch.org/whl/cpu/torch_stable.html

COMMANDS FOR VERSIONS < 1.0.0

Via conda

This should be used for most previous macOS version installs.

To install a previous version of PyTorch via Anaconda or Miniconda, replace “0.4.1” in the following commands with the desired version (i.e., “0.2.0”).

Installing with CUDA 9

conda install pytorch=0.4.1 cuda90 -c pytorch

or

conda install pytorch=0.4.1 cuda92 -c pytorch

Installing with CUDA 8

conda install pytorch=0.4.1 cuda80 -c pytorch

Installing with CUDA 7.5

conda install pytorch=0.4.1 cuda75 -c pytorch

Installing without CUDA

conda install pytorch=0.4.1 -c pytorch

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号