SoFunction
Updated on 2024-11-16

Win10 from zero installation configuration pytorch full process graphic details

1. Install anaconda

(anaconda comes with many packages, including python, so you don't need to download python separately)
You can click on the following Tsinghua open source software mirror station, in the official website to download anaconda is not as fast as under this
/anaconda/archive/ mirror (computing)

I downloaded the version below, which corresponds to 3.7, and anaconda3 stands for python3.

我下载的是这个版本在这里插入图片描述

The download process is basically the default option

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

You can leave add anaconda to my PATH environment variable unchecked in the following step, and add it again afterward

在这里插入图片描述

Remember to skip this step if it's there, it's not in my version of anaconda.

在这里插入图片描述

在这里插入图片描述

The following test to see if the installation is successful, at the beginning of the open anaconda prompt, see as shown in the figure that is successful!

在这里插入图片描述

在这里插入图片描述

2. Confirm the graphics card and update it in time (in preparation for the subsequent pytorch installation)

Open Task Manager - Performance to see if there is a GPU or only a set of graphics

在这里插入图片描述

Win+r again, run cmd, type nvidia-smi and then enter

I got the following error, add C:\Program Files\NVIDIA Corporation\NVSMI to the environment variable path to solve the problem.

在这里插入图片描述

Normal operation of the obtained

在这里插入图片描述

It is important to note here that the tableDriver Version needs to be greater than 396.26, otherwise go to geforce experience and update the card.I've updated the latest version here.

3. Download pytorch

/official website
It should be noted here that if there is a GPU in the second step of the previous view, then the CUDA selection of 10 can be, if you choose 9, after the bad use of the mirror source to download, the speed will be very slow; if there is only a set of graphics, then the CUDA selection None can be

在这里插入图片描述

After that we copy the installation command from Run this Command

在这里插入图片描述

Open anaconda prompt and enter the following command:

conda config --add channels /anaconda/cloud/pytorch/
conda config --add channels /anaconda/pkgs/main/
conda config --add channels /anaconda/pkgs/free/

Since you chose to download from the mirror source, you need to remove -c pytorch from the install command, i.e.: conda install pytorch torchvision cudatoolkit=10.1

Here we create a virtual environment conda create -n your_env_name (here is the name you give to the virtual environment, I named pytorch) python = (I chose the next 3.6), and then operate inside, enter the command conda install pytorch torchvision cudatoolkit=10.1, then y(es)

在这里插入图片描述
在这里插入图片描述

Finally, we check whether the installation is successful, first type python to enter the python work environment, and then type import torch, if there is no error, then pytorch installation is successful, and then enter the command .is_available(), if it shows Turn, then the GPU can be used by pytorch

在这里插入图片描述

configure

Open pycharm, File - New Project - Pure Python
Location of your choice, Interpreter choose to open the location where you installed anaconda, select envs/your_env_name (virtual environment name)/ can be

在这里插入图片描述

After creating thepython consoleRunning and re-running atimport torchRun without errors.is_available(), if Turn is displayed, configure the

summarize

To this point this article on win10 from zero installation configuration pytorch full process of the article is introduced to this, more related window10 pytorch installation content please search for my previous articles or continue to browse the following related articles I hope that you will support me more in the future!