创建虚拟环境
# 创建虚拟环境
conda create -n pytorch_gpu python=3.11
# 激活虚拟环境
conda activate pytorch_gpu
下载torch,torchvision
cu118/torch-2.2.2%2Bcu118-cp311-cp311-win_amd64.whl
cu118:cuda版本11.8
torch-2.2.2:torch版本2.2.2
cp311:python版本3.11
安装torch,torchvision
进入下载torch所在目录安装
pip install .\torch-2.2.2+cu118-cp311-cp311-win_amd64.whl
pip install .\torchvision-0.17.2+cu118-cp311-cp311-win_amd64.whl
安装成功界面