1

I've been trying to set up GPU enabled Tensorflow for a while and I'm stuck at this point. when I try to import tensorflow into my program I get the following error:

ImportError: libcudnn.so.5: cannot open shared object file: No such file or directory

I've checked /usr/local/cuda/lib64/ and sure enough libcudnn.so.5 is there and it is readable by anyone so that should be fine. I'm installing Tensorflow using virtualenv so I thought perhaps it was looking for it somewhere else but I can't figure out where else it would look for the file. Anyone have any idea of what the problem could be?

patrickdamery
  • 539
  • 6
  • 16
  • 2
    is `/usr/local/cuda/lib64` in your `LD_LIBRARY_PATH` environment variable, or otherwise visible to the runtime dynamic linker? Including in the environment that tf is running in? It would likely be helpful/useful if you posted all output up to the point of the import error. – Robert Crovella Apr 23 '17 at 03:00
  • Yep, LD_LIBRARY_PATH seems to have been the problem, I had installed ROS recently and it seems to have set that variable to point to a different location. Changing the variable to /usr/local/cuda/lib64 seems to have solved it for me, thanks! If you'd like post your comment as an answer and I'll mark it as the answer! – patrickdamery Apr 23 '17 at 03:31
  • 1
    You can have multiple locations specified in your `LD_LIBRARY_PATH` environment variable. Each path in it (separated by `:`) is a path the runtime linker will search when it is looking for libraries. – Robert Crovella Apr 23 '17 at 03:45
  • Thanks for the tip! – patrickdamery Apr 23 '17 at 03:56

0 Answers0