pip install pytorch code example
Example 1: get pytorch version
import torch
print(torch.__version__)
Example 2: conda install pytorch
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Example 3: python pip install
https:
python get-pip.py
Example 4: pytorch install
pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio===0.8.1 -f https:
Example 5: torch conda
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
Example 6: pytorch anaconda install windows
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch