New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory #26182
Comments
|
@gian1312 I think it is looking for CUDA10 file. The error is due to mismatch is CUDA version. Best approach is install TF from clean state. Please follow @ppwwyyxx suggestion to select best versions (TF1.12, CUDA9.0 or TF1.13,CUDA10.0) for your need. Please uninstall python and tensorflow and then follow the instructions to install TF fresh. Please let me know how it progresses. Thanks! |
identical problem here. clean installation of Nvidia drivers, CUDA 10.1 and TF libcublas.so.10.0 error as soon as TF is called. Ubuntu 18.04.2 LTS; Also Anaconda install of Python 3.7 (is the anaconda install relevant?); 2070 |
@rhinsall Which TF version you are trying to install? Could you install CUDA10 or correctly reference the CUDA10.1 path in cuDNN. Thanks |
It does not seem possible to install Tensorflow with default packaging on Ubuntu 18.04. You have to either build TF from scratch, which requires sourcing an older version of bazel than is available through the default repositories, or manually install specific versions of nvidia drivers and libraries. None of the linked wheels from upthread are yet built against CUDA 10.1. |
Thanks a lot. I relyed on the website and haven't realised, that a new version came out a few days ago. I am sorry. I downgraded to 1.12. Now, my graphic card gets found with the mentioned code. Sadly, the code (an example from a lecture I attend) which runs on my Windows installation perfectly fine (30 s) takes 6 min on my Linux installation an puts the CPU under load. Is there a work around to force Tensorflow to use the GPU? |
I'll come home much later and report the exact numbers and paths - but it's a fresh install, downloaded yesterday, CUDA 10.1 per Nvidia's instructions and TF clean install using PIP & Python 3.7 |
@rhinsall conda install cudatoolkit
conda install cudnn I have cuda-10.1 installed on my box, this installed a local conda-only cuda-10.0. Obviously this is to just keep tensorflow working while waiting for better support. |
Excellent advice. Immediate rescue. Thank you very much fabricatedmath. |
hi, Package Planenvironment location: /home/lasii/anaconda3/envs/drunk2 added / updated specs: The following packages will be downloaded:
The following NEW packages will be INSTALLED: _tflow_select pkgs/main/linux-64::_tflow_select-2.1.0-gpu `Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors I just started using github. Guide me if I am posting improperly. |
@ivineetm007 , Can you check the CUDA version! |
@codexponent |
I think you should update your CUDA version to 10 along. |
@codexponent Now , there are two cuda in conda environment package list. But the same error occurs on importing tensorflow. |
@ivineetm007 , Can you do nvidia-smi and check the head of the table! I am sure that you need to update cuda by downloading the nvidia driver from their website. |
@codexponent I am working on a PC in college which is alloted to two or three students. I am not sure if I install cuda by downloading , it will not affect the other environment in conda. |
@ivineetm007 , if this is not your pc i suggest you don't update it as it might break other environments working for cuda 9. Do one thing, create a new environment, install tensorflow with the specific version number |
@codexponent |
@ivineetm007 , try to do the same thing with opening tf session on the gpu. This link may help Another solution: Don't install anything from conda, just install from pip
|
Same problem.My cuda version is 10.1,but the the libcublas.so.10.0 file is not in the catalogue of lib64.I am installing the tensorflow-gpu with the command 'pip install tensorflow-gpu'. |
It seems that the libcublas-version is removed by the cuda 10 |
@lipingbj , did you update the cuda version from conda command or through nvidia official site, I think doing from the actual site might help t get those .so files |
Look for compatible tensorflow and cuda versions: |
Install CUDA 10.0 into /usr/local/cuda110.0/ where your program will find the new libraries. If you have CUDA 10.1 installed into /usr/local/cuda-10.1/ along with the nvidia drivers. In that event, skip installing the drivers and only install the cuda libraries. Don't link /usr/local/cuda to 10.0. Leave it linked to 10.1. We just need the libraries in the location tensorflow looks for it. cuda 10.0 successfully shares the drivers 10.1 installed. |
On a fresh ubuntu 18.04, this does purge nvidia* to try and get a clean install.
Reboot, no really.
CUDNN CUDNN can be downloaded from here note if you're redirected to the NVIDIA home page you either need to sign in, or create an account, come back here click that link again it'll take you to the download page. Select the one that says 'Download cuDNN v7.something, for CUDA 10.0' make sure it's for version 10.0
Reboot, welcome to the party. This is the most reliable fiddle free way I can find, it always seems to work whereas conda etc seems to be flakey for sometimes. |
Why is this closed? It is definitely an issue, where tensorflow doesn't seem to be observing the naming conventions of unix shared libraries. So, for tensorflow-gpu==2.1.0, it's trying to load Either that, or there's more stringent requirements on the individual cuda versions. (Is Cuda really that unstable from version to version?) Whatever the case, tensorflow 2.1.0 is supposed to be compatible with cuda 10.1 -- the installation instructions show installing cuda 10.1. But it's then trying to load a 10.0 shared library. That is a bug in tensorflow, or in the instructions. |
|
this works for me! thanks! |
in case anyone still facing this:
|
This worked out for me. I had a tensorflow-gpu 1.13.1 installed inside a python virutal environment. CUDA installation is 10.0. Tried symlinks but didn't work. Setting LD_LIBRARY_PATH did the job. |
Thanks, I was looking for a solution that would allow me to run various versions of tensorflow and pytorch on the same machine. This worked out great! |
Thanks! It worked for me! As a workaround, I exported both
In this way tensorflow is working, alongside |
I found this topic while I was trying to resolve similar problem but seems with newer version. So want to add for those who get here too. Right now actual Python version 3.8.5 installs TensorFlow 2.3.0. Easiest way to install it together with nvidia drivers (thanks @marcfielding1) is:
Once done, it cause the same:
That happens because Adding it to include path helps and everything seems working:
|
Adding
to your .bashrc or .zshrc would do the trick. |
This worked perfectly for me, plus I added After that tensorflow found physical GPU. |
Specifically, the 10-2 packages come from libcublas10 (which may get installed automatically with the others, but not if apt thinks it's already installed e.g., when I deleted the "surprise" files). A possible corner case for some.
I then symbolic linked it into cuda.
|
SUCESS!
and it ran about 5x faster on this very simple problem. |
Check what do you have in if for example you get
you need to export cuda-10.1 and cuda-10.2 as following
and
This is what works for me |
Doesn't this section fix that? Just asking as I was about to do a clean install :-)
|
I just ran into this issue installing tensorflow 2.3.1 with the current instructions at https://www.tensorflow.org/install/gpu which are currently:
I fixed it by just adding these steps at the end:
Add to ~/.bashrc: export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-10.2/lib64:/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH |
Massive kudos to the scholar and gentleman @alexkyllo . His two simple additions to the official guide saved my life. To reiterate once more:
What a mess the tensorflow installation process is. Hours wasted for nothing. This thread alone goes back 1.5 years. |
may anaconda evrioment is wrong, uninstall cudunn in anaconda |
This is Work for me
Thanks |
In case anyone finds this during a search... I just had this problem with Tensorflow build under CUDA 11.7. The error was coming from the call to cudnnCreate() in stream_executor/cuda/cuda_dnn.c. The problem was a mismatch between the versions of CUDA (specifically libcublas) and libcudnn8. In my case, I accidentally installed the cuda10.2 variant of the libcudnn8 RPM. Installing the correct cuda11.7 version resolved it. |
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
-Anaconda - pip install tensorflow-gpu
I was using tensorflow gpu last year. I wanted to set it up again. I got it running on my Windows 10 partition. Now I have tried to set it up again on my Mint partition. I always get the following error.
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory.
I thought TF needs cuda 9.0 and not 10.0?
The error occurs if I execute the following code.
import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
The text was updated successfully, but these errors were encountered: