Loading

【bug】NVIDIA GeForce RTX 4060 Laptop GPU with CUDA capability sm_89 is not compatible with

虚拟环境中cuda版本过低导致无法使用显卡的问题

完整的报错信息是这样的:

报错信息
serWarning: 
NVIDIA GeForce RTX 4060 Laptop GPU with CUDA capability sm_89 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.
If you want to use the NVIDIA GeForce RTX 4060 Laptop GPU GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
 
  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))

我原本安装的是python 3,7 + torch 1.6.0 + cuda 101
但是cuda118以上才能支持40系列的显卡
cu118支持的python版本最低为3.8
在这里我发现:已经创建好的conda环境还是可以改python版本的,直接pip install新的版本python就可以了
最后安装了cp38 + pytorch2.1.0 + torchvision 1.6.0 + cu121
成功解决了这个bug

参考文献

https://blog.csdn.net/qq_41413211/article/details/135371260
下面这篇是cuda torch和python的版本对应关系
https://blog.csdn.net/weixin_41809117/article/details/141246957

posted @ 2025-06-16 17:42  SaTsuki26681534  阅读(259)  评论(0)    收藏  举报