Pycharm set the correct environment variable PATH

后端 未结 3 724
南笙
南笙 2020-12-19 01:25

I\'m executing with pycharm the following:

print(os.environ[\"PATH\"]) # returns \'/usr/bin:/bin:/usr/sbin:/sbin\'

But when I execute echo

3条回答
  •  猫巷女王i
    2020-12-19 01:58

    I work on the command line in bash and my environment, including $PATH, is set in .bash_profile. The default terminal in PyCharm is tcsh. I changed it to bash by going File ... Default Settings ... Tools ... Terminal ... Shell Path and then restaring. The embedded terminal worked as expected.

提交回复
热议问题