pip install pytorch or pip install torch code example
Example 1: mac install pytorch 3.6
conda install pytorch torchvision -c pytorch
Example 2: check cuda version pytorch
torch.version.cuda
conda install pytorch torchvision -c pytorch
torch.version.cuda