The easiest method is to use Anaconda. Download the installer and follow the instructions.
Once Anaconda is installed, you’ll need to install several additional Python packages. Under Windows, you’ll need to launch the Anaconda Prompt from the Windows start menu. Under Linux or OSX, you should be able to execute the following commands from the terminal. In both cases, make sure that the Anaconda environment is active before you execute the commands. This getting started with conda page has some information on using the conda command-line tool.
# Install pytorch and related libraries
conda install pytorch torchvision torchaudio cpuonly -c pytorch
# Install the nbgrader extension (This may take a few minutes)
conda install -c conda-forge nbgrader
Under Linux, the graphical Anaconda Navigator is not installed by default. It can be installed as follows:
You are free to use whatever Python editor you prefer. The Anaconda
environment comes pre-installed with
Spyder. Which can be launched from the
navigator, or by typing spyder
in the conda terminal.