This tutorial provides steps for installing PyTorch
on Windows,
Linux and Mac with PIP
for
CPU
and CUDA
devices.
pip3 install torch torchvision torchaudio
PyTorch installation on Windows with
PIP for CUDA 10.2
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
PyTorch installation on Windows with
PIP for CUDA 11.3
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
pip3 install torch==1.10.0+cpu torchvision==0.11.1+cpu torchaudio==0.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip3 install torch torchvision torchaudio
PyTorch installation on Linux with
PIP for CUDA 11.3
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
pip3 install torch torchvision torchaudio
import torch
print(torch.__version__)
Category: PyTorch