自学内容网 自学内容网

【报错】NVIDIA 驱动版本不兼容 — NVIDIA driver on your system is too old

【报错】NVIDIA 驱动版本不兼容 — NVIDIA driver on your system is too old

报错信息

CUDA initialization: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.


查看torch版本

import torch
print(torch.__version__)
print(torch.cuda.is_available())

在这里插入图片描述

1.12.1+cu113

查看nvidia驱动版本

nvidia-smi

在这里插入图片描述

NVIDIA-SMI 470.82.01    Driver Version: 470.82.01    CUDA Version: 11.4 

在指定的conda环境下命令行运行下列代码,发现输出false

python
import torch
print(torch.cuda.is_available())

更新gpu版本的torch
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2

可以顺利使用GPU
在这里插入图片描述


原文地址:https://blog.csdn.net/weixin_56462041/article/details/135628895

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!