3 scenarios to get $PATH below: 1) from Terminal 2) from Python launched from Terminal 3) from Python (IDLE)
1) In terminal: >> echo $PATH
leads to the list of ~10-15 locations
2) Run Python in terminal:
>> python
>> os.environ['PATH']
>> # I get the same list as in the first scenario. Expected
3) Now I run python IDLE (so, don't run Terminal)
>> os.environ['PATH']
>> # I get different list of paths. much less locations comparing to 1 or 2 scenarios.
Q: how do I change $PATH such that it affects Python IDLE? I found some recommendations to update $PATH from .bash_profile, but looks like they affect $PATH only when I run Terminal.
I also considered /etc/paths, but still there is a location (/usr/loca/bin/) there that is missed in 3d scenario. So what is basically the origin of $PATH variable in Mac OS X?