Win10环境下RTX3080使用Pytorch或Tensorflow的环境配置

报错信息

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

  1. CUDA11.1和Cudnn8.0.4从官网安
  2. 使用conda install pytorch torchvision cudatoolkit=11 -c pytorch-nightly来安装pytorch
  3. 使用tensorflow的话 可以先conda install cudatoolkit=11 然后再pip install tensorflow-gpu==1.15
    先装好tf就无法安装cudatoolkit11,conda自带的是cudatoolkit10;
    先装好cudatoolkit11,再用conda装tf可能会报错,用pip不会

注意

由于需要cuda11的支持,因此向下兼容的原则不适用。

转自

我本地环境说明

如何查看电脑安装的cuda版本号

cuda信息
在这里插入图片描述
在这里插入图片描述

安装pytorch

pytorch配置我直接安装的是11.0
在这里插入图片描述

解决下载速度慢问题

此处参考安装与电脑CUDA匹配的pytorch版本

将原始命令

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

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值