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.9.0: cannot open shared object file: No such file or directory #17629
Comments
I proposed a solution that worked for me in #15604 |
@mldm4 I have also replied to you at 15604, the issue is not really that I couldn't get it to work, I know what the problem is. I just need this to be fixed, or mentioned more specifically (it already is, just not that clearly) in the TensorFlow docs, and included in the common installation problems. |
I also face the same problem with same configuration. But when I install cuda-9.0 version the issue got solved. I feel tensorflow-gpu version is using the cuda-9.0 version specifically. |
this has been a persistent problem since i first installed tensorflow. it seems totally unable to reference the latest cuda library and instead insists on a specific x.version. i last managed to correct this with CUDA v8.0 by renaming than file libXXX.so.N to the version it was looking for. |
https://github.com/mikewlange/tensorflow-gpu-install-ubuntu-16.04 was the only way could install TensorFlow gpu and Cuda 9.1. Trust me - was about to throw my computer out the window. and that's what did it. I installed the full anaconda package.
(tensorflow) mike@mike:~$ nvidia-smi +-----------------------------------------------------------------------------+ (tensorflow) mike@mike:~$ nvcc -V I use Keras as it's so damn simple. But out of protest I may only use Theno and the backend and not TF. |
@mldm4 Hi, do you mean to downgrade coda to v9-0 ? Can you please be more specific and point your hyperlink to the comment with the proposed solution to gain people more time ? It would be great ! |
I'm on my phone so have to be brief.. However when installing cuda 9.1 the folder created is labeled cuda9.1. All the instructions say to set your $PATH to yadda/yadda/cuda/yadda/bin. Changing the path to $yadda/yadda/cuda9.1 shits the bed and you get this error. If you've installed 9.1, leave it alone and follow the installation instructions step 2 here https://github.com/mikewlange/tensorflow-gpu-install-ubuntu-16.04
…Sent from my iPhone
On Apr 25, 2018, at 5:51 AM, sebma ***@***.***> wrote:
@mldm4 Hi, do you mean to downgrade coda to v9-0 ?
Can you please be more specific and point your hyperlink to the comment with the proposed solution to gain people more time ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@mikewlange Thanks 😃 |
My pleasure. Hope you got it going!
… On Apr 26, 2018, at 10:57 AM, sebma ***@***.***> wrote:
@mikewlange Thanks 😃
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
jamesredwards said: "this has been a persistent problem since i first installed tensorflow. it seems totally unable to reference the latest cuda library and instead insists on a specific x.version. i last managed to correct this with CUDA v8.0 by renaming than file libXXX.so.N to the version it was looking for." @jamesredwards , or anyone else who is circumventing this error by renaming files, could you clarify how I'd do this for libcublas.so.9.0? I'm running cuda v8.0 on ubuntu 16.0.4, and tensorflow-gpu is erroring out with "ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory" . In the /usr/local/cuda/lib64/ directory I see libcublas.so , libcublas.so.8.0, libcublas.8.0.61 and libcublas.so.8.0.88. I can use sudo mv to rename these files. Just renaming libcublas.so.8.0 to libcublas.so.9.0 does not fix this error. Do I have to do something to the other files as well? Is tensorflow looking for licublas.so.9.0 in a different location than /usr/local/cuda/lib64/ ? Thanks for any help! |
This issue is related to Google's protobuf-compiler due to which tensorflow fails to find the shared object file, in this instance, libcublas.so.9.0. Even switching from CUDA 9.1 to 9.0 didn't help as tensorflow was still unable to locate the file. Building the latest version of protobuf (3.5.0) from source didn't help either. What worked for me was to install the system-wide protobuf compiler through apt install protobuf-compiler on Ubuntu 16.04. And, install the python version through pip3 install protobuf. I am using CUDA 9.0 as 9.1 is not yet compatible with tensorflow's pre-built binary. You can check the system-wide protobuf version using protoc --version which is 2.6.1 on 16.04. The protoc python version is 3.5.2.post1. Hope this helps. I had a similar issue using earlier versions of tensorflow and CUDA 8, and had documented this troubleshooting procedure. Using the same procedure, I am able to use tensorflow 1.8.0 too. |
What worked for me was the process described at https://medium.com/@taylordenouden/installing-tensorflow-gpu-on-ubuntu-18-04-89a142325138 plus the protobuf bit @dashsd provided above. $PATH and $LD_LIBRARY_PATH all use '/usr/local/cuda-9.0'. The latter contains two separate entries, as described in #16750: one for /usr/local/cuda-9.0/extras/CUPTI/lib64 and another for /usr/local/cuda-9.0/lib64. I use Ubuntu 18.04 on a Dell XPS 15" with NVIDIA GeForce GTX 1050 (GP107M), driver version 390.48. Tensorflow now runs on CUDA 9.0 and CUDNN 7.0.5. |
Hi @shivaniag > it would be great if you can reassign this issue if you have other priorities at the moment. |
I have the same bug cuda9.2 cuDNN7.14 |
Same bug in cuda-9.2 for me as well |
Hi @shivaniag you would really help the community if you re-assign this issue... |
TF 1.9 is also built against cuda 9.0. So, it's not going to work with cuda 9.2 unless it is built from source. I had a hard time trying to do it. With all unsuccessful attempts, I switched back to 9.0 for now. However, on Antergos, it's available pre-built with 9.2. It was more convenient to me rather than building it from source. Sorry, there's not much help I can provide regarding this. Some poor souls have successfully built it. Here's one of the links: https://github.com/fo40225/tensorflow-windows-wheel |
I have the same problem. CUDA 9.2, cuDNN7.1 |
Same problem here. CUDA 9.2, cudNN 7.1.4 |
You have to re-compile tensorflow. The builds are not compatible with this combination yet. We have compiled the latest master branch with Package available here (temporarily) |
re-compile tensorflow.
clone tf code:
Do you wish to build TensorFlow with jemalloc as malloc support? [Y/n]: enter build:
testing:
print Hello, TensorFlow! |
Yeah but what a pain.. I mean cuda 9.2 and cudnn 7.1 have been there for quite a while already... |
Tensorflow 1.10 released and it still requires cuda 9.0!!!!!! Can someone confirm this? ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive |
Please refer combinations of CUDA, CuDNN and Tensorflow. This error happens majorly due to incorrect version combinations of Nvidia-driver, CUDA, CuDNN and Tensorflow-gpu |
Yesterday I received this message. |
Try this Victor Snagged most of these words from stack overflow. I’ve run into similar.
This how #2 above handled it upon discovery.. I could not even cd to the folder. I changed the owner of the cuda-9.0from root to my-user-name and after that python was able to find the missing library.
This is almost always a missing path in your LD_LIBRARY_PATH. We know.. check it again and proceed. Find libcublas.so.9.0on your system (start looking under /usr/local). If you don't find it, then install the CUDA 9.0 Toolkit https://developer.nvidia.com/cuda-90-download-archive after you read the rest.. NOTE::::::: with TF 1.5 you want 9.0 toolkit and not 9.1 as anyone who has installed this does that, don’t. If you have it, then update your LD_LIBRARY_PATH to point to the appropriate lib directory. If you've done either of those and are now getting a similar looking error for a cudnn related library, then repeat that process for the CUDNN library. https://developer.nvidia.com/cudnn I think the latest version works. Tensorflow depends on both CUDA toolkit and the CuDNN library extension. Note that you can install all of this in userspace too (sudo is typical, but not required). |
I got same error message when import tensorflow. And now, I solve this problem already. |
mikewlange, Thanks for pointing me in the right direction. Your resources worked. It seems that ''wonky'' is the right term to describe this problem with the pip virtual environment. |
Thanks. Just a word to others trying to do all this. It’s obvious by watching this thread.. If you don’t know what you’re doing from the getgo. I.e., you’re not a AI engineer who know specifically knows why they need CUDA , taken heed. CUDA is mess with TensorFlow (and TF is a mess on its own). You’re wasting time here if you want to check out CUDA. think about the Ml/AI solution you’re trying to solve and work accordingly. Don’t just install this monster if your have no idea how to use it. If you want to just learn, use docker for the love of god. There are a million images that can work. Try Kaggle’s AI image. Ready to go with no nonsense like this. Masochists you all are. Lol. |
We'll, if you don't want me help. @elithrar please come with a better solution? |
And for the love of god. If you don't know why you need TF, stop using it!!! https://medium.com/@julsimon/apache-mxnet-support-in-keras-83de7dec46e5 convert you TF model to MXnet: https://github.com/Microsoft/MMdnn and them get to work!!!! |
ALL READ: - https://github.com/awslabs/keras-apache-mxnet is your TF replacement. you won't look back.... trust me. Been at this for 24 years (software engineering in general) and have built anything you've seen on the net. And guess what, without TF. Worked at hedge funds to build prop trading tools and algos, search and rescue 100% autonomous drones, ios slot machines, surgical tools, ect... All without TF. you are correct no CUDA needed either. Honesty, anything you need to do, can do it PyTorch. Or,
OR - easier...
OR, here is what sane people do who have to do this for a living....
1.. FInd the model yourself - example: OR - or https://github.com/mikewlange/KETTLE Good luck and don't let your self get stuck for more than 1:30 min. Draw a line.. |
Unfortunately, Tensorflow and pytorch support CUDA 9.0 and CUDA 9.2 respectively until now: 18.11.20. Let's try this. follow images are tensorflow gpu support and pytorch gpu support respectively. |
Hi all, https://medium.com/@asmello/how-to-install-tensorflow-cuda-9-1-into-ubuntu-18-04-b645e769f01d Bonne chance! |
February 2019, stil no concrete solution. |
This issue seems to not be given enough attention. Why is tensorflow searching for libcublas.so.9.0 when CUDA 10.0 is installed. I installed tensorflow and ran some programs but it seemed most of the GPU memory wasn't being allocated to tensorflow so I rebooted my pc and then I received this error. |
@Emile0205 I agree! |
I had this problem trying to use tensor flow within a conda environment. tensorflow worked fine with the standard install in my base python 3.6, but not in my conda environment that I use for python. Here is what worked for me. I checked that the file did actually exist at /usr/local/cuda-9.0/lib64 and found that I have libcublas.so.9.0 and then made a new notebook that uses the tf-gpu kernel, and: Worked |
I had the same problem (with CUDA 9.2), and somehow got it solved ~magically using |
Hi, folks! Why all this fuss? Read below! See https://devtalk.nvidia.com/default/topic/493290/multiple-cuda-versions-can-they-coexist-/ |
Automatically closing this out since I understand it to be resolved, but please let me know if I'm mistaken.Thanks! |
OS Platform and Distribution:
Linux Ubuntu 17.10
TensorFlow installed using pip
TensorFlow version: 1.6, with GPU support
Python Version: 3.6.4
CUDA version: 9.1
GPU model and memory: NVidia GEForce 940MX 2GB
command to reproduce:
~$ python3
Problem:
Whenever you run a tensorflow program, you get a huge error log, but the main problem is this:
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
So, the reason this is happening is because TensorFlow wants Cuda 9.0, but I have Cuda 9.1. This problem can be fixed by installing Cuda 9.0, but I have a few requests. Seeing that a couple of people have this problem (see #15604, #15817, #15817), I think that TensorFlow could be updated so that it works with Cuda 9.1 (but I think this issue is only with Ubuntu), or the following could be done:
Update the TensorFlow documentation, saying that you specifically need Cuda 9.0 for TensorFlow 1.6, and Cuda 8.0 for TensorFlow 1.4, and so on
And also, include this in the errors list at https://www.tensorflow.org/install/install_linux#common_installation_problems.
Edit: If a Pull Request is required to update the documentation, I am fine with doing that.
The text was updated successfully, but these errors were encountered: