Pycharm environment different than command line

后端 未结 7 1360
轮回少年
轮回少年 2020-12-05 10:11

I am having an issue getting my Pycharm environment to match up with the environment that I have on the command line. I recently removed python and reinstalled it via home

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-05 11:12

    .bash_profile is being read by bash (your command line interpreter) only. However if you want to preserve bash environment for PyCharm there is one true Linux way.

    Run PyCharm from your command line (from bash). Thus environment variables will be inherited from bash to pycharm. Read $man environ for information on linux environment inheritance process. So all you need is just launch ${PATH_TO_PYCHARM}/bin/pycharm.sh from command line. Or create launcher which invokes bash for PyCharm launching.

    Thats it ! Hope that works for you.

提交回复
热议问题