firstly github install
then
First make sure your using anaconda'spython
and not the system one.
To installpytorch
viaconda
do
conda install pytorch torchvision -c soumith
or via pip
For python3
pip install http://download.pytorchorg/whlcu75torch-0.1.12.post2-cp35cp35mlinux_x86_64whl pip install torchvision
For python2
cp27none dont install the CUDA version if you dont have Nvidia GPU on your machine that supports.