3方案,以獲得低於$ PATH:1)從終端2)從Python從航站樓3)推出在Python(IDLE)
1)終端:>> echo $PATH
導致列表的〜10-15位置
2)運行Python在終端:
>> python
>> os.environ['PATH']
>> # I get the same list as in the first scenario. Expected
3)現在我運行python IDLE(因此,不運行終端)
>> os.environ['PATH']
>> # I get different list of paths. much less locations comparing to 1 or 2 scenarios.
問:如何更改$ PATH,以便影響Python IDLE?我發現了一些建議,從.bash_profile更新$ PATH,但看起來像只在運行終端時影響$ PATH。
我也考慮過/ etc/paths,但仍然有一個位置(/ usr/loca/bin /)存在於3D場景中。那麼基本上Mac OS X中$ PATH變量的來源是什麼?
這個問題應該有你正在尋找的答案:http://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-優勝美地 –