How to install PyTorch with PIP

This tutorial provides steps for installing PyTorch on windows with PIP for CPU and CUDA devices.

PyTorch installation with PIP for CPU



pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html


PyTorch installation with PIP for CUDA 10.1



pip install torch==1.7.0+cu101 torchvision==0.8.1+cu101 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html


PyTorch installation with PIP for CUDA 10.2



pip install torch===1.7.0 torchvision===0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html


PyTorch installation with PIP for CUDA 11.0



pip install torch===1.7.0+cu110 torchvision===0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html


Verify installation


import torch

print(torch.__version__)



Categories: PyTorch