ImportError: libcuda.so.1: cannot open shared object file

Issue

When I run my code with TensorFlow directly, everything is normal.

However, when I run it in a screen window, I get the following error.

ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

I have tried the command:

source /etc/profile

But it doesn’t work.

Cause I use ssh to connect to the servers, the screen is necessary.

How can I fix it?

Solution

Try to put libcuda.so.1 path to LD_LIBRARY_PATH environment variable.

example:

export LD_LIBRARY_PATH=/path/of/libcuda.so.1:$LD_LIBRARY_PATH

Answered By – Jethro Sandoval

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published