NVIDIA GeForce RTX 5060 踩过的坑!

该文章已生成可运行项目,

1. pytorch安装

NVIDIA GeForce RTX 5060 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5060 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

上述错误说明:5060显卡的算力为“sm_120” 而a女装的pytorch最高只支持sm_90。但是pytorch官网“stable”版本暂不支持sm_120。

解决:

        可以先安装 nightly 版本的 PyTorch 过度

# 先卸载已存在的pytorch
pip uninstall torch torchvision torchaudio

ps:虽然你安装的pytorch ,验证“print(torch.cuda.is_available())  为 True”但是在运行程序是会出现上述错误

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129

再次验证pytorch是否可用:

import torch
print(torch.cuda.is_available())  # 输出 True 为torch可用
print(torch.cuda.get_device_name(0))  # 输出 显卡信息
print(torch.version.cuda)  # 显示 CUDA 版本

出现问题:

(**) C:\U***>pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129
Looking in indexes: https://download.pytorch.org/whl/nightly/cu129
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

发现找不到该版本,你需要更新你的python版本,我之前是python3.8会出现这个错误,但是升级到python3.10就可以正常安装了

参考链接:

https://github.com/Scarfy-sysu/rtx5060-pytorch-cuda129

https://blog.youkuaiyun.com/yin18827152962/article/details/149151015

-------------------------------------------------------2025年9月28日-----------------------------------------------------

本文章已经生成可运行项目
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值