报错信息
GeForce RTX 3080 with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
我之前电脑为1650,电脑安装的pytorch版本对应的是cuda 10.2
# 先粘一下别人的解决方法,显然报错是因为版本不匹配
解决方法
环境:Win10+Python3.6.12+CUDA11.1+Cudnn8.0.4
- CUDA11.1和Cudnn8.0.4从官网安
- 使用
conda install pytorch torchvision cudatoolkit=11 -c pytorch-nightly
来安装pytorch - 使用tensorflow的话 可以先conda install cudatoolkit=11 然后再pip install tensorflow-gpu==1.15
先装好tf就无法安装cudatoolkit11,conda自带的是cudatoolkit10;
先装好cudatoolkit11,再用conda装tf可能会报错,用pip不会
注意
由于需要cuda11的支持,因此向下兼容的原则不适用。
我本地环境说明
cuda信息
安装pytorch
pytorch配置我直接安装的是11.0
解决下载速度慢问题
将原始命令
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch
改为
conda install pytorch torchvision torchaudio cudatoolkit=11.0
去掉了-c pytorch
可能出现的错误
Collecting package metadata (current_repodata.json): done
Solving environment: \
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64::torchaudio==0.7.0=py37
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64::torchvision==0.8.1=py37_cu101
|
Warning: 2 possible package resolutions (only showing differing packages):
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/win-64::anaconda-custom-py37_1
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64::anaconda-custom-py37done
解决
The environment is inconsistent, please check the package plan carefully The following packages are