Home » Questions » Computers [ Ask a new question ]

How do I properly update Python on Mac OS X

How do I properly update Python on Mac OS X

If I download python from the Python website and try to install it with the installer, it installs, but I need to specify that I want the new version of Python when I run my programs from terminal. If I just type:

Asked by: Guest | Views: 179
Total answers/comments: 2
bert [Entry]

"I finally found how to do it.
The installer made a python 2.6 folder in /Application
In this folder is a script called Update Shell Profile.command
I just needed to execute it and now it's working."
bert [Entry]

"Find out where python lives:

$ which python
/usr/bin/python

See if it's a symlink:

$ ls -Fal /usr/bin/python
lrwxr-xr-x 1 root wheel 72 May 19 12:02 /usr/bin/python@ -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python

If so, link /usr/bin/python to the new python:

$ sudo ln -s (new python, maybe /System/Library/Frameworks/Python.framework/Versions/2.x/bin/python) /usr/bin/python

Check if it works:

$ python --version
Python 2.xxx"