Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cossie

macrumors member
Original poster
Aug 8, 2006
74
0
Hi,

I installed the most recent version of Python on my MBP, I tried using the script that comes with the Python package "Update profile shell.command" and I've tried setting my PATH as:

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

and

Code:
PATH="/Library/Frameworks/Python.framework/Versions/3.1/bin/

But each time I go open up a Terminal window and type 'python' I get:
"Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)"

Can anyone help me out? I've been spending a lot of time with Windows environments lately through work so I'm probably rusty with OS X, but I'd appreciate some help in setting up Python correctly.

Cossie
 
I came up with a bit of a workaround, I've installed Eclipse, setup the PyDev plugin and set the 3.1 install as the interpreter for PyDev.
 
Instead of typing 'python' in a Terminal window, type (or copy and paste) the following two commands:
Code:
echo "$PATH"
which python
Paste the output in a forum post.
 
This is the default bahavior

Since 3.1 is not backwards-compatible, to use 3.1 you have to type python3 in the terminal. If you want 2.5 then just type python (or you could type python2.5). If you try changing what typing python does, you could break Apple software, so don't even try it!
 
Since 3.1 is not backwards-compatible, to use 3.1 you have to type python3 in the terminal. If you want 2.5 then just type python (or you could type python2.5). If you try changing what typing python does, you could break Apple software, so don't even try it!

I tried 'python3' in the terminal and that gives me the latest version I installed, thanks for the explanation BrainySmurf :)
 
Since 3.1 is not backwards-compatible, to use 3.1 you have to type python3 in the terminal. If you want 2.5 then just type python (or you could type python2.5). If you try changing what typing python does, you could break Apple software, so don't even try it!
Actually... there IS an officially supported way to make the default python in Terminal version 3, without breaking Apple software in the process. There's a little shell script that came with your Python download. Look in your Python 3.1 folder, inside Applications.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.