Pycharm ImportError tensor stream, but works fine with terminal

I created virtualenv with the tensor stream installed, and I changed the Python interpreter where the virtual server is located. When I ran the program, it threw an error:

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

I have the following lines written in my .bashrc file

export CUDA_HOME=/usr/local/cuda-8.0
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:$LD_LIBRARY_PATH
export PATH=${CUDA_HOME}/bin:${PATH}

In addition, I found the libcudnn.so.5 file in the following path:

/usr/local/cuda-8.0/lib64 

I ran into this error before opening PyCharm and I was able to install the correct version of cudnn. The problem is that I can use

$ source [virtualenv_path]

virtualenv python , , . Pycharm, , . - ? ?

+8
3

, pycharm CUDA_HOME LD_LIBRARY_PATH IDE. "" → " ", . CUDA_HOME LD_LIBRARY_PATH. , pycharm. , . , source [virtualenv_path], . , , .

+6

Stackoverflow: Pycharm, , , , PyCharm bash. , PyCharm , . , , PyCharm charm, .

+4

, . , .

Tensorflow , Pycharm, :

1- . :

pycharm-community

2- If you use Unity, you need to edit .profilebecause Pycharm does not save bash: open a terminal and type:

gedit .profile

Then add the following codes to the end of the open file:

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Save and exit.

+2
source

Source: https://habr.com/ru/post/1675971/


All Articles