The best way to get a clean installation of PyTorch, is to install the pre-compiled binaries from the Anaconda distribution. Therefore, we need to setup Anaconda first.
- Go to the download section and download your desired Anaconda version for Linux
- Run the downloaded shell script and follow the install instruction, do
cd ~/Downloads
sh Anaconda3-2018.12-Linux-x86_64.sh # actual name depends on your downloadTo keep things clean, now setup an environment for Anaconda, do
conda create --name py37_torch python=3.7 # you can choose the name of the environment and the python version
There are two different ways on how to proceed.
Go to pytorch.org and choose your desired settings like so
