conda install torch version=1.0.0 code example
Example 1: torch conda
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
Example 2: cuda 10 install pytorch
# CUDA 9.2
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=9.2 -c pytorch
# CUDA 10.0
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch==1.2.0 torchvision==0.4.0 cpuonly -c pytorch