title: MacOS Sierra: modify $PATH globally
body: <p>3 scenarios to get $PATH below: 1) from Terminal 2) from Python launched from Terminal 3) from Python (IDLE)</p>
  
  <p>1) In terminal: <code>&gt;&gt; echo $PATH</code> leads to the list of ~10-15 locations</p>
  
  <p>2) Run Python in terminal:</p>
  
  <pre><code>&gt;&gt; python
  &gt;&gt; os.environ['PATH']
  &gt;&gt; # I get the same list as in the first scenario. Expected
  </code></pre>
  
  <p>3) Now I run python IDLE (so, don't run Terminal)</p>
  
  <pre><code>&gt;&gt; os.environ['PATH']
  &gt;&gt; # I get different list of paths. much less locations comparing to 1 or 2 scenarios.
  </code></pre>
  
  <p>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.</p>
  
  <p>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?</p>