Reputation: 5780
From what I understand all versions of CUDA are backwards compatible, but after going through the whole process of installing CUDA and setting up a virtual environment with TF this happens when I import tensorflow
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory
which apparently means Tensorflow is looking for CUDA 8.0 but doesn't find CUDA 8.0 because I have CUDA 9.1 but if it is backwards compatible why should that matter? It's pretty surprising for such a popular library to be some vague on the setup instructions so I'm hoping someone here can shed some knowledge.
I'd have no problem installing CUDA 8.0 but of course that isn't an option, I can only get the latest version via the NVIDIA website. What's the fix for this?
Upvotes: 4
Views: 9459
Reputation: 152173
If you have a binary (of any sort) that is linked against CUDA libraries such as libcublas.so.8.0
, you won't be able to satisfy the requirement at shared-object-dynamic-load-time by substituting another library such as libcublas.so.9.0
. CUDA has certain kinds of forward/backward compatibility, but this is not one of them. You must provide the exact library the code was linked against.
If you want to access an older CUDA toolkit version, so as to make an older library available, those CUDA toolkit versions are generally available on the CUDA Toolkit Archive page here.
If you already have a newer CUDA toolkit loaded and working properly, you should be able to load an older toolkit and use it without updating/modifying your installed GPU driver.
To work around this so as to be able to actually use a newer library, you would need to relink (at least) the code/binaries that you are using.
Upvotes: 4