Requirements

Python3+ installed - How to update Python to Python3+

Anaconda installed - How to install Anaconda

This installation does not include support for GPU acceleration.

Conda Install PyTorch

Once you have Anaconda installed, installing PyTorch is breeze. Just run following command...

sudo conda install pytorch

Verify PyTorch Installed

import torch
torch.randint(3, 5, (3,))
>>> tensor([4, 3, 4])

or run following command on your shell...

python3 -c 'import torch as t; print(t.__version__)'
1.4.0

Pip Install PyTorch

You can also install PyTorch using Pip without the Anaconda.

pip3 install torch