Which one is in your PATH? that gets launched.
In the Terminal, type echo $PATH and see if there's any Python references there.
The PATH is an environment variable that is a list of directories that the operating system looks in to find commands issued by the userThread title says it all 😀
I installed Python 3.1, but when I type python in the terminal, it launches python 2.5.1.
Can the two version coexist?
Can I uninstall 2.5.1?
If I can, should I?
The Python 3.1 Mac installer comes with a shell script which makes it the default Python to use on the Mac. Just run that and you will be sorted.
Are you referring to Update Shell Profile.command? I ran it to no avail.
A simple restart of the Terminal is often all that's needed to make path changes take effect - not a full log out and back in.Sometimes you need to log out and log back in again for changes to the path to take effect. Try that.
A simple restart of the Terminal is often all that's needed to make path changes take effect - not a full log out and back in.
Still no luck. I shut down my Mac, had a shower , brushed my teeth, went to bed, slept, woke up, turned my Mac back on, launched the terminal and went I type Python, it still launches 2.5.1.
How did I install: downloaded an image from www.python.org and opened the package.
There are many ways. I would probably recommend (as the system probably likes 2.3 a lot) adding a symlink to /usr/local/bin called py3 or python3 or something like that like this:
sudo ln -s "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/python" /usr/local/bin/py3
The path to the 3.1 python executable might not be quite right, so you can just sub it in.
Then when you want to use version 3, you'd just type py3. When you wanted the 2.3, just type python. I would not change, at the system level, which one gets called by default. If you really, really want to get version 3 by typing python, you could add an entry to your bath by editing your .bash_profile, like:
export PATH=/my/new/dir:$PATH
Then you can make a symlink called python in /my/new/dir. That way, when you ran python from the terminal it would find the version 3 executable before it found the version 2 one. I think this would let the system still use the python it likes by name, but someone may need to correct me on this.
-Lee