Reputation: 835
I installed Tensorflow. When I try to import it:
import tensorflow as tf
I get the following issue:
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
I have installed CUDA 10 and referenced it in my LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.0/lib64
I am working under Ubuntu 18.04.1 with Python 2.7.
Should I uninstall CUDA 10 and install CUDA 9 instead or can I keep working on Tensorflow using CUDA 10 ?
Upvotes: 0
Views: 2042
Reputation: 2865
You don't have to go back for your TensorFlow version. I'm using TensorFlow 1.13 with Cuda 10.1. The problem was related to old installations. I don't have libcublas.so.9.0 in my directories. I'm using Cuda 10.1, but it says the same error. if you've installed the old version previously, make sure you've removed all old versions of TensorFlow and Cuda. you can call pip to uninstall TensorFlow-GPU, it will remove the current, but when you call `pip list | grep TensorFlow, there might be an old version installed on your pc. Remove it completely and install TensorFlow-GPU again. There are 2 issues related to this. take a look at these solutions
Tensorflow 1.13 does not use GPU
Upvotes: 1
Reputation: 914
I just had this same problem on Google Colab when trying an GPU accelerator for NuSVR (Thundersvm).
I had to install Cuda 9.0 do overcome it. (Cuda 9.2 , Cuda 10.0 and others, did not worked)
Just follow:
!wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64-deb
!ls # Check if required cuda 9.0 amd64-deb file is downloaded
!dpkg -i cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64-deb
!ls /var/cuda-repo-9-0-local | grep .pub
!apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
!apt-get update
!sudo apt-get install cuda-9.0
credits to Medium Post: Sifat Muhammad Abdullah
Upvotes: 0
Reputation: 19123
Any version of Tensorflow between 1.6 and 1.12 are built against CUDA 9, Tensorflow 1.13 is currently just a release preview, so if you installed via pip install tensorflow-gpu
you got the stable version (1.12 as of now).
You then need to install CUDA 9. Note that different CUDA versions can coexist so no need to uninstall CUDA 10
Upvotes: 2