Updating Nvidia Driver on Ubuntu

Two days ago, I stumbled upon an error when trying to import tensorflow module in Python. The error message was, "AttributeError: module '' has no attribute 'CheckpointableBase'". It was an existing installation of TensorFlow in an Anaconda virtual environment. I tried installing the latest version of TensorFlow in a new virtual environment, but it did not work.

$ conda create -n tfgpu
$ source activate tfgpu
$ pip3 install tensorflow-gpu

Instead, it raised a new issue. "Status: CUDA driver version is insufficient for CUDA runtime version". Hence, I checked the CUDA version using nvcc --version command, and decided to install the CUDA toolkit also.

$ conda install cudatoolkit

Installing cudatoolkit solved the new issue, but the old issue arose again. An issue had already been raised on GitHub for this problem, and the solution that worked for me was updating to the latest Nvidia driver.

$ sudo apt update
$ sudo apt upgrade
$ ubuntu-drivers list
$ sudo apt install nvidia-VERSION-NUMBER
For me, the version number was 415.
$ sudo apt install nvidia-415


Write a Comment