. Advertisement .
..3..
. Advertisement .
..4..
I am new to python and searching the “importerror: libcuda.so.1: cannot open shared object file: no such file or directory” to understand it better. It seems it doesn’t work as expected when I used some suggestions before. Here is the command line I use:
source /etc/profile
The error I’m getting is below:
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
Please give me the solution to this issue.
The cause:
This error occurs because your CUDA application is not linked statically when you build it.
It’s also possible that the library search path has some misconfiguration because libcuda.so.* ordinarily are set up in a directory on that path!
Solution:
To fix this error, first, you need to ensure that you have a(n up-to-date) CUDA driver set up exactly. If you hasn’t had yet, let’s download and install it, your problem will be solved.
Then, you need to situate the libcuda.so.1 file (for example using location)
You also can put
libcuda.so.1
path intoLD_LIBRARY_PATH
environment variable as following:Follow these steps: Locate libcuda.so.1
Next, add $LD_LIBRARY_PATH with the following command in terminal: