On Ubuntu 15.10, I am running PyCharm Community Edition version 2016.1. I have a Python file that calls import tensorflow
, a module that depends on the CUDA library libcudart.so.7.5
. When I run this file, the following error message appears:
ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory
Now the libcudart.so.7.5
file is located on my machine in /usr/local/cuda-7.5/lib64
. And in Pycharm I added this path to File->Settings->Project Interpreter->Interpreter Paths
. So, I am puzzled by why PyCharm cannot find libcudart.so.7.5
, given that the directory containing it is listed as an interpreter path.
Also, if I run this file from the command line, it works fine without the above error. In my .bashrc
, I have a line:
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
Thus, this apparently allows you to find the library file. But how can I get PyCharm to find a library? My understanding was that adding a path to the interpreter path was a solution, but it seems like this might be wrong ...
Thanks!
source share