安装Pytorch的CUDA11.6的bug,torch.cuda.is_available()返回false

》》》

我一开始的python版本是3.9下载失败,cpu的成功了,但是GPU的不行

当时的下载命令:

pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url  https://download.pytorch.org/whl/cu116

一、一开始报这个bug

ERROR: Could not find a version that satisfies the requirement
pytorch1.13.1 (from versions: none)ERROR: No matching distribution found for pytorch1.13.1
ERROR: Could not find a version that satisfies the requirement
pytorch1.13.1 (from versions: none)ERROR: No matching distribution found for pytorch1.13.1
ERROR: Could not find a version that satisfies the requirement
pytorch1.13.1 (from versions: none)ERROR: No matching distribution found for pytorch1.13.1

网上一大堆各种解决办法,没到点子上

就是Python版本不够,升级python版本就好

conda install python=3.10.10
  • 我试过了 3.10.0 的版本还是下载不了cuda116,最后我直接升级到 3.10.10 就解决了

  • 你自己试试看得升到哪个版本的 python

二、如果还报bug,如果是下面这个,不兼容:

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

》如下解决办法

  • 1.使用pip install --upgrade pip命令升级pip到最新版本,然后重新安装依赖包。
  • 2.尝试安装指定版本的依赖包,例如pip install package_name==version_number。
  • 3.如果以上方法都不能解决问题,可以使用conda来安装依赖包,它可以更好地处理依赖关系。首先安装Anaconda或Miniconda,然后在conda环境中使用conda install package_name命令安装依赖包。

》。》

再贴上一个相对有用的安装文章 https://blog.csdn.net/qq_46126258/article/details/112708781

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

木18

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值