cuda≤11.6,觀察控制面板
觀察torch對應cuda版本?https://download.pytorch.org/whl/torch/
安裝cuda11.6.0?CUDA Toolkit Archive | NVIDIA Developer
cmd輸入nvcc -V
編輯國內鏡像源 .condarc
anaconda prompt輸入
查看環境 ??????????conda env list 安裝py3.9 ????????conda install python=3.9.0 創建新環境 ????????conda create -n pytorch1 python=3.9 激活環境???????????conda activate pytorch1 查看當前pip?????? ?pip list cuda是向下兼容的,可離線下載cu116(cuda114向下cu113)pip install …win_amd64.whl 在線安裝 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip install torch==1.13.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.14.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html
PyTorch中torch、torchvision、torchaudio、torchtext版本對應關系_torch與torchvision版本_Liekkas Kono的博客-CSDN博客
查看pytorch ????????????????
python
?import torch
?torch.__version__
激活環境?conda activate pytorch1 后再進入python或jupyter notebook編譯