SoFunction
Updated on 2024-10-28

Windows10+anacond+GPU+pytorch Installation Detailed Procedure

1. Check if your computer matches the GPU version.

Device Manager view.

在这里插入图片描述

Check the official website for a match. Address:/cuda-gpus  **

在这里插入图片描述

2. Go to NVIDIA and check the version of your computer** to see.

在这里插入图片描述

在这里插入图片描述

If you can, you can uninstall the original version and install the new one. Installation address/cuda-toolkit-archive

在这里插入图片描述

Next, enter the NVIDIA installation process, in this installation process, I began to directly select the streamlined installation, but due to VS reasons, resulting in the normal installation, so I switched to a customized installation method, and the VS checkmark to remove, it can be installed normally, as for the installation of the CUDA directory, we can default to install in the C disk.

在这里插入图片描述

After the installation is complete, it is time to configure the environment variables. The environment variables are configured as shown below.

在这里插入图片描述

Verify that the installation was successful.

在这里插入图片描述

mounting

strike (on the keyboard)/rdp/cudnn-download You can choose to download download cudnn, but here you need to register an account, and then the questionnaire before you can download the page, anyway, step by step operation can be.

在这里插入图片描述

Remember to match here, or the installation will fail at a later stage. After downloading, unzip it, copy the bin, include, and lib files inside the CUDNN package directly to the CUDA installation directory, and then directly overwrite the installation.

在这里插入图片描述

This is the end of the cuda, cudnn installation success!

**4. Installation of anacond

Keep clicking next.

在这里插入图片描述

The first unchecked will work. The exact process can be seen/article/

5. Install pytorch

If you install tensorflow, the previous steps are exactly the same. Only the installation password is different. Here we only describe the installation process of pytorch in detail.

Open the Anaconda Prompt under anaconda and paste the command to install, this process depends on the speed of the Internet, generally very fast. But generally I like to activate an environment that is used first:conda create --name pytorch python=3.6Take a virtual environment. Next activate pytorch and install it inside the environment, so that even if you install tensorflow, you can just install another environment. Convenient.

在这里插入图片描述

Here are the installation commands. If the press to install is slow, you can try a clear image to do the installation.

conda config --add channels /anaconda/pkgs/free/ conda config --add channels /anaconda/pkgs/main/ conda config --add channels /anaconda/cloud/pytorch/ conda config --add channels /anaconda/cloud/peterjc123conda config --set show_channel_urls yes

Finally, enter the command copied from the official website:conda install pytorch torchvision cudatoolkit=10.0To complete the installation (the original command conda install pytorch torchvision cudatoolkit=10.0 -c pytorch you need to remove the latter part or it will still be downloaded by default, then the mirror source is useless)

If you still can not install, it is recommended to visit this blogger's article /qq_38704904/article/details/95192856 look at the local download pytorch after the installation process, in fact, it is relatively simple.

Also attached is a complete list of download addresses for each version of pytorch:/qq_27825451/article/details/90033909

Also note in this place, install torchvision to match torch.

Otherwise, you will get the following error

在这里插入图片描述

6. Test for success

在这里插入图片描述

summarize

To this point this article on Windows10+anacond+GPU+pytorch installation detailed process of the article is introduced to this, more related to Windows10 anacond GPU 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!