Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have installed python via mac ports, using:

sudo port install python33

I then did:

sudo port select --set python python33

and got:

Selecting 'python33' for 'python' succeeded. 'python33' is now active.

However when I do which python I get:


and for which python3 I get:


What have I done wrong?

When I do: port select --list python

I get:

Available versions for python:
    python33 (active)

When I do type -a python, I get:

python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /opt/local/bin/python
python is /usr/bin/python
python is /usr/local/bin/python

When I type: echo $PATH, I get:

share|improve this question

which looks on the path to find the first python that itcan find. port select chnages /opt/local/bin/python to call the chosen python. For this to work /opt/local/bin has to be on the path before any other directory that contains python.

In your case you have /Library/Frameworks/Python.framework/Versions/2.7/bin and /Library/Frameworks/Python.framework/Versions/3.1/bin before /opt/local/bin.

You need to clean up your path. I would suggest starting from scratch and only adding directories that you know and understand. You seem yo have installed python in many ways and also have installed fink and macports. I would onlyuse one of the package managers and remove all the explicit python from the path.

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.