Previous article: How to install PyTorch on Windows 10 using Anaconda
This is a quick update to my previous installation article to reflect the newly released PyTorch 1.0 Stable and CUDA 10.
Step 1: Install NVIDIA CUDA 10.0 (Optional)
This is an optional step if you have a NVIDIA GeForce, Quadro or Tesla video card. Download the NVIDIA CUDA 10.0 Toolkit from the link below and install it. You can choose the network or local installer depending on your preference.
Step 2: Install Anaconda with Python 3.7
Anaconda is a great development environment that is supported across MacOS, Windows and Linux. I highly recommend this program. It makes it easy to install several Python code editors and PyTorch. My preferred editor is Spyder but Jupiter Notebook is also very popular and is used in a lot of the PyTorch challenge coursework. Download the file from the link below and install.
Additionally here are some Windows installation instructions from Anaconda if you run into any trouble.
Step 3: Install PyTorch from the Anaconda Terminal
Go to the Start Menu > Applications > Anaconda and open the Anaconda Prompt. Here you will run the following command to install PyTorch:
conda install pytorch torchvision cuda100 -c pytorch
If you didn’t install CUDA and plan to run your code on CPU only, use this command instead:
conda install pytorch-cpu torchvision-cpu -c pytorch
Lastly I recommend updating all the modules and dependancies in Anaconda using the following command:
conda update --all
Press “Y” to start the update. It will take a few minutes to finish.
Step 4: Install Intel MKL (Optional)
If you have an Intel CPU, there are libraries you can install that speed up math processing routines. It’s best to install this after updating conda since the packages are specialized and can be older than the normal packages.
conda install -c anaconda mkl
Step 5: Choose your IDE
Now load Anaconda and choose either Spyder or Jupiter Notebook. You can also check for updates by clicking the gear icon in the upper right hand corner of the application. If you have any issues or find any problems, feel free to leave a comment and I’ll update the post. Thanks and happy programming!