【报错】NVIDIA 驱动版本不兼容 — NVIDIA driver on your system is too old
- 报错信息
- 查看torch版本
- 查看nvidia驱动版本
报错信息
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