Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using built-in Python 2.6.1, however, I need to run Python 3.0 from time to time.

  • Is it OK to install Python 3.0 on my Mac? Is there anything that I need to be cautious?
  • How about the easy_install? If I have 2.6 and 3.0 on my Mac, where to the library for easy_install is installed?
  • Is there any easy way to make python point to 2.6 or 3.0?
share|improve this question
up vote 5 down vote accepted

There are several ways to install Python and which way affects the later answers. In all cases you should install a later Python 3 version - 3.1.3 is the latest released version. For choosing which to run I would call python3.1 or python2.6 to be explicit as the language differs enough that the code is specific to the 2.x or 3.x branches. In fact much code starts with the #!/usr/bin/env python line but is 2.x specific. I would say that having the python executable on your path being linked to python3.1 would be a problem Apple scripts that use python always look for /usr/bin/python so will always find the Apple version and not a properly installed other version.

easy_install is from an external package setuptools and you can tell where to put it.

Simplest is install from the installer This will give a python3 executable in /usr/local/bin (and possibly python as well). In this case I would create a python symbolic link in ~/bin (pointing to the apple python or python3 and you can switch where it points as you require without sudo which a link in /usr/local/bin would require.
In this case I think easy_install for python3 will by default end up in /usr/local/bin and the apple one is in /usr/bin

I use macports versions and they install in /opt/local and have a script port select that will switch /opt/local/bin/python between the 3.1 or 2.6 versions (or any others you have installed) - unfortunately not does not do this for easy_install which is in /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin (or 3.1 etc)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.