When we are running pytorch script, we may get this error: RuntimeError: The NVIDIA driver on your system is too old (found version 10000). In this tutorial, we will introduce you how to fix it.
Check the current cuda version installed
We can use command to check the current cuda version we have installed in our computer.
For example:
nvidia-smi
Then, we will find a result as follows:
Here our cuda version is 10.0
Check pytorch cuda version supported
We can check pytorch you have installed supports which version of cuda.
For example:
import torch print(torch.version.cuda)
Run this code, we will see the version is 10.2
Then we can find version 1.10 ≠ 10.2
How to fix this RuntimeError?
We can update our cuda version from 10.0 to 10.2. Meanwhile, we also can update pytorch version.
In this tutorial, we will update pytorch version.
First, we can find some pytorch history versions in this page:
https://pytorch.org/get-started/previous-versions/
As to us, we will update pytorch version that will support cuda 10.0
Open https://download.pytorch.org/whl/cu100/torch_stable.html, then we will download torch-1.4.0+cu100-cp36-cp36m-linux_x86_64.whl to install.
pip install torch-1.4.0+cu100-cp36-cp36m-linux_x86_64.whl
Then, we will find this error will be fixed.