1

I have several lines in .bash_profile in my macOS needed for the tensorflow.

export PATH=/Developer/NVIDIA/CUDA-8.0/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-8.0/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
export CUDA_HOME=~/cudnn
export DYLD_LIBRARY_PATH=$CUDA_HOME/lib:$DYLD_LIBRARY_PATH 

When I run my python program in Terminal, everything is fine, since it loads the .bash_profile first.

However, PyCharm don't source .bash_profile. So, we need to provide Environment variables in PyCharm.

Can someone please help me to update those lines in PyCharm. I have hard time to make it correct.

enter image description here

Patrick
  • 797
  • 5
  • 15
  • please refer to https://stackoverflow.com/questions/42708389/how-to-set-environment-variables-in-pycharm – yash Oct 25 '17 at 00:36
  • @yklsga step wise, I know how to do it, but I dont think my translate from .bash_profile into the PyCharm is correct, since I still see missing lib when I run the program in PyCharm. – Patrick Oct 25 '17 at 00:39
  • before running try to print all environment variables that are available to you, `import os for k,v in os.environ.items(): print(k+" "+v)` , see whether lib is available to you or not – yash Oct 25 '17 at 00:43

0 Answers0