title: OS X - multiple python versions, PATH and /usr/local
body: <p>If you install multiple versions of python (I currently have the default 2.5, installed 3.0.1 and now installed 2.6.2), it automatically puts stuff in <code>/usr/local</code>, and it also adjusts the path to include the <code>/Library/Frameworks/Python/Versions/theVersion/bin</code>, but whats the point of that when <code>/usr/local</code> is already on the PATH, and all installed versions (except the default 2.5, which is in <code>/usr/bin</code>) are in there? I removed the python framework paths from my PATH in <code>.bash_profile</code>, and I can still type <code>"python -V" =&gt; "Python 2.5.1"</code>,  <code>"python2.6 -V" =&gt; "Python 2.6.2"</code>,<code>"python3 -V" =&gt; "Python 3.0.1"</code>. Just wondering why it puts it in <code>/usr/local</code>, and also changes the PATH. And is what I did fine? Thanks.</p>
  
  <p>Also, the 2.6 installation made it the 'current' one, having <code>.../Python.framework/Versions/Current</code> point to 2.6., So plain 'python' things in <code>/usr/local/bin</code> point to 2.6, but it doesn't matter because <code>usr/bin</code> comes first and things with the same name in there point to 2.5 stuff.. Anyway, 2.5 comes with leopard, I installed 3.0.1 just to have the latest version (that has a dmg file), and now I installed 2.6.2 for use with pygame.</p>
  
  <p>EDIT: OK, here's how I understand it. When you install, say, Python 2.6.2:
  A bunch of symlinks are added to <code>/usr/local/bin</code>, so when there's a <code>#! /usr/local/bin/python</code> shebang in a python script, it will run, and in <code>/Applications/Python 2.6</code>, the Python Launcher is made default application to run .py files, which uses <code>/usr/local/bin/pythonw</code>, and <code>/Library/Frameworks/Python.framework/Versions/2.6/bin</code> is created and added to the front of the path, so <code>which python</code> will get the python in there, and also <code>#! /usr/bin/env python</code> shebang's will run correctly.</p>