tensorflow: TensorFlow 1.13.1: ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04.6 LTS
- TensorFlow installed from (source or binary): Binary (pip3 install -U tensorflow-gpu
- TensorFlow version: current version from pip (maybe version 1.13.1)
- Python version: Python 3.5.2
- Installed using virtualenv? pip? conda?: virtualenv environment with pip
- CUDA/cuDNN version: Cuda 9.0
- GPU model and memory: Titan Xp
Describe the problem
I tried to install tensorflow-gpu follow the instruction at link and pip install -U tensorflow gpu. But when I check it import tensorflow as tf appear a bug as follow:
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
Meanwhile, I also tried installing pytorch and succeeded. (Figure below)

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 37 (1 by maintainers)
Yes, I figured out my system installed Cuda 9.0 but maybe tensorflow 1.13.1 only support Cuda 10. So I installed tensorflow 1.12.0 and it works!
Thanks!
how did you solve it ?
I have TensorFlow 1.13.1 working on Ubunutu 16.04 with Python 3.7.2. I had the error above using CUDA 10.1, but it went away after downgrading to CUDA 10.0
We need to wait until tensorflow providing support to CUDA10.1.
I solved the problem with missing libraries in tensorflow-gpu by creating these 7 links:
sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudart.so.10.2.89 /usr/local/cuda/lib64/libcudart.so.10.0sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7.6.5 /usr/local/cuda/lib64/libcudnn.so.7sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so.10.2.2.89 /usr/local/cuda/lib64/libcublas.so.10.0sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcufft.so.10.1.2.89 /usr/local/cuda/lib64/libcufft.so.10.0sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcurand.so.10.1.2.89 /usr/local/cuda/lib64/libcurand.so.10.0sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcusolver.so.10.3.0.89 /usr/local/cuda/lib64/libcusolver.so.10.0sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcusparse.so.10.3.1.89 /usr/local/cuda/lib64/libcusparse.so.10.0Without downgrade any chance ?
Hello,
I had the same issue. I fixed it by adding the below command to the ‘.bashrc’ file.
System configuration:
I used conda to configure my system.
I had the same problem with tf 1.14 on Ubuntu 19.10 with Cuda 10.1
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))If it reports 0 GPUs, it should list libraries that it can’t find. I got it working by creating symlinks from the 10.1 libraries to the 10.0 names that TensorFlow reported was missing
sudo ln -s /usr/lib/x86_64-linux-gnu/libcusparse.so.10.1.168 /usr/lib/x86_64-linux-gnu/libcusparse.so.10.0You’ll need to do a find to locate the library locations and there will likely be 5-10 libraries listed that you’ll need to do this for.
using tensorflow 1.12, it is working.
Same here on CentOS 7, TF 1.13.1 would not import with latest CUDA (10.1) but worked fine after downgrade to CUDA 10.0. Thanks for the tip.
Can you explain how to easily downgrade from cuda 10.1->10.0? Do you also have to change the Cudnn libraries?
How do you go about downgrading CUDA from 10.1 -> 10.0? Running arch btw
Thanks! It was really helpful to me. I have been suffering this problem for 1 month and cant figure out how to fix this until i see your comment! ❤️ You are so smart ❤️
On ubuntu 18.10 - I successfully installed CUDA 10.0 toolkit by downgrading gcc and g++ version to 7.3. Now I can see my
nvcc --versionis10.0.But still I getting that common errors…
libcublas.so.10.0is missingAny IDEA ? Now what’s a issue !
if you are using conda
no need to install cuda.
Recently I reinstalled ubuntu then have this problem. I searched for
libcublas.so.10.0on pc, only found it under conda floader., maybe I should install cuda by deb.you can do that with this command. sudo apt purge cuda sudo apt autoremove sudo apt install cuda-10-0
And now it is working.
just had the same issue on Debian