PyCharm cannot find library
While some of these answers are correct, and could work, I haven't seen what the OP specifically asked for, and that is where to set environments for the python console. This can be accomplished inside pycharm at:
File > Settings > Build,Execution,Deployment > Console > Python Console
In the options there, you'll find a place to define Environment Variables. Set LD_LIBRARY_PATH there.
The path to your cuda library seems strange to me. I would expect it to be /usr/local/cuda-7.0/lib64
or /usr/local/cuda-7.0/lib
.
Did you follow all of the cuda installation procedure?
If you type env
on the command line, do you see a path to cuda in your LD_LIBRARY_PATH
?
Update from comments below:
The issue is that PyCharm was invoked from the desktop, and wasn't getting the right environment variables. Solution is to either:
- invoke from the command line,
- create a script to set environment and then invoke, and make a link to that script on the desktop,
- or set environment variables on the desktop item
I came across this problem just recently using a remote debugger, however I believe it's still the same solution. I just added the following to the Environment Variables section in the Run/Debug Configuration options found in Run > Edit Configurations... dialog: LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH