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-优胜美地 –