Installing torch 1.7#
1. Install cuda and cudnn#
For details, please refer to my previous article.
2. Find the version that suits you on the official website#
Previous PyTorch Versions | PyTorch
I installed cuda11 on a Windows system using this command. The installation commands may vary for different systems, please refer to the official documentation for specific instructions.
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
If there are no errors, the installation is complete. If the installation is slow, please consider changing the pip source.