# Issues changing default version when updating Python on Mac

I have a MacBook that came with Python 2.5 installed. I need use a newer version, so I downloaded 3.1 and installed it, then ran the "Update Profile Script" that came with it, which is supposed to change the default version of Python to the one I downloaded. It appeared to run fine and said process completed, but it didn't work. When I type "python" into the terminal it displays version 2.5, and I still can't install pygame, which requires at least Python 2.6.

When I do vi .profile I get this:

export PATH=.:/opt/local/bin:/opt/local/sbin:$PATH export MANPATH=/opt/local/man:$MANPATH

# Setting PATH for Python 3.1

# The orginal version is saved in .profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.1/bin:\${PATH}"

export PATH


So it looks like the script did do something, but I don't know enough bash script to understand what. Does anyone know what the issue could be or how to fix it?

-
Holy formatting! –  squircle Jun 1 '10 at 20:44
If you type in "which python" what do you get back? It looks like it prepended the python 3.1 bin folder to your PATH, which is correct since just typing "python" will execute the first one in the PATH. –  Taylor Leese Jun 1 '10 at 20:46
I get /usr/bin/python –  Emma Jun 1 '10 at 20:58
possible duplicate of Using Python on Mac –  Daniel Beck Jan 29 '11 at 11:44

defaults write com.apple.versioner.python Version 2.6