[Tutor] updating python on a mac

Alan Gauld alan.gauld at btinternet.com
Sun May 16 23:31:44 CEST 2010


"Karl Jansson" <janssonks at gmail.com> wrote 

>I downloaded python 3.1.2 for the mac, and I don't know how to make it  
> so that when I type "python" in the terminal that I get python 3.1.2  
> instead of 2.5.1, which came with my mac.

I haven't done this personally so I can only guess but...

> /Applications/Python\ 3.1/Update\ Shell\ Profile.command ; exit;
> This script will update your shell profile when the 'bin' directory
> of python is not early enough of the PATH of your shell.
> These changes will be effective only in shell windows that you open
> after running this script.
> All right, you're a python lover already
> logout

Did you follow these instructions? ie did you logout and then restart 
the shell window - ie Terminal?

If so and it didn't work try running the env command

Look for the PATH entry and see whether Python 2.5 comes before Python 3.1.

If so you probably need to edit your ~/.profile or ~/.bashrc or ~/.cshrc 
depending which shell you use.

HTH

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/





More information about the Tutor mailing list