1. Description
pytorch1.2.0+python3.6+CUDA=10.0+cudnn=7.4.1.5
Two, steps
Create a new virtual environment in conda
Check out all your environments
Activate the virtual environment
conda activate torch1.2.0
About cuda and cudnn
1. Check that your computer system is version 10.2
I want to directly download and install the corresponding version 10.0, but the result is that the custom path cannot be placed in the same path as the existing one (pictured above), which may be the reason why only one path can be placed in the system, so I want to install it in a virtual environment. I checked the information and said that it is virtual The cuda environment and system will not be affected?
Ann CUDA:
(1) Search library name: cuda, the command is as follows:
anaconda search -t conda cudatoolkit
Ann cudnn:
anaconda show conda-forge/cudnn
What if there is no +7.4.1.5?
https://blog.csdn.net/qq_43705697/article/details/121618276
conda search cudnn --info
I ended up installing the recommended cudnn=7.6.5.32
conda install --channel https://conda.anaconda.org/conda-forge cudnn=7.6.5.32
Test whether the installation was successful
After installing cuda and cudnn in the virtual environment , you want to test whether the installation is successful. You cannot use the nvcc -V command to test. You need to install the pytorch package in the virtual environment for testing.
Install pytorch
pip install torch===1.2.0 torchvision===0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
Next install some packages: save the following to a txt text file, then find the path, and install it with one click as follows:
scipy==1.2.1
numpy==1.17.0
matplotlib==3.1.2
opencv_python==4.1.2.30
torch==1.2.0
torchvision==0.4.0
tqdm==4.60.0
Pillow==8.2.0
h5py==2.10.0
pip install -r C:\Users\hp\Desktop\1.txt