Anaconda
Url:https://www.anaconda.com
Download the newest version(2022.05.windows.x86-64) of the anaconda for windows, the highest-level comparability reach to python 3.9(64-bit)
CUDA
wiki: search CUDA
Figure out GPU’s compute capability-8.6
Check the CUDA Driver Version
Choose the proper CUDA Runtime Version≤ CUDA Driver Version
PyTorch, choose the right CUDA Runtime Version = 11.6,typing following command in virtual environment(followings are two choices)
Failed this method
Successfully working!
Test it out
import torch
torch.cuda.is_available() #output : true
Pycharm settings
commands for conda
conda env list #find which environments are installed
conda create -n <virtual environment name> python=<version> [-c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main] #create env using channel or not
conda activate <virtual environment name> # entry the env
conda deactivate # exit virtual environment
conda remove -n <virtual environment name> --all # remove virtual environment
conda uninstall <pkgname> # pip is often used and recommended
conda install <pkgname>