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>
本文介绍如何在Windows环境下安装最新版Anaconda,并设置兼容Python 3.9的虚拟环境。此外,还详细说明了如何根据GPU计算能力和CUDA版本选择合适的PyTorch版本,确保深度学习项目的顺利运行。

541

被折叠的 条评论
为什么被折叠?



