I have installed both python3.3 and python2.6. I have set python3.3 to default by creating an alias named "python" in usr/bin and another one for python2.6 named "python2.6". Now if I type in the terminal "python" python3.3 will be open but if I type "python2.6" I get "cannot execute binary file". I can launch the binary directly but not through the alias. I have checked the permissions and are the same for both binaries and aliases so I don't know what to do. Can someone help me?

  • 1
    Did you create aliases (in Finder) or symbolic links (in Terminal)? Can you execute the python2.6 binary in its installation directory directly?
    – nohillside
    Feb 3, 2013 at 16:32
  • Aliases using finder and yes, I can run python 2.6 from the original folder without problems.
    – Rnhmjoj
    Feb 3, 2013 at 16:40
  • 1
    I would recommend using symbolic links for this instead of aliases
    – nohillside
    Feb 3, 2013 at 16:48
  • I created a link using "ln" and it's working. Thank you.
    – Rnhmjoj
    Feb 3, 2013 at 17:02

1 Answer 1


Instead of using Finder aliases, use Terminal to create symbolic links (see man ln for details on usage):

ln -s /path/to/python3.3/binary /usr/local/bin/python
ln -s /path/to/python2.6/binary /usr/local/bin/python2.6

It's usually not a good idea to mess with /usr/bin content (will be wiped out with the next upgrade). Use /usr/local/bin instead and make sure it comes before /usr/bin in $PATH.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .