using system $PATH variable in PyCharm

Hello,

I have recently faced such a problem: I am using PyCharm with pyenv virtual environment python + CUDA + pycuda. When I try to run a script from the pycharm itself, it will throw me a bunch of errors, one of which is that nvidia compiler nvcc is not found. However when I run the script from the terminal ('python test.py') or even if I run the pycharm from the terminal ('PYCHARM_PATH/pycharm.sh') and then run the script then everything works fine. Therefore, the issue should be that it seems that the pycharm does not use the system environment variable from the .bashrc file by default. Can you give me some hints how to force the pycharm to use the $PATH from the system's .bashrc by default so I wouldn't need to run it from the terminal every time?

Kind Regards

1
1 comment
Avatar
Permanently deleted user

The issue is seems to be solved. Adding environment variables to the 'tools->terminal' and to 'the build, execution, deployment->console->python console' didn't help. However it is solved by adding the PATH and LD_LIBRARY_PATH to the 'run/debug config'.

0

Please sign in to leave a comment.