conda install pytorch latest 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
import torch
print(torch.__version__)
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch