Upgrade Python on a Mac

Robert Kern robert.kern at gmail.com
Mon Mar 2 18:18:19 EST 2009


On 2009-03-02 17:06, Rey Bango wrote:
> Thank you Kevin (&  all who replied). The next question (which I think
> will be my last until I've read more info) is:
>
> Once installed, how will I be able to distinguish between the OSX
> Apple-supplied, preinstalled version and the newly installed version
> that I downloaded from Python.org? Currently, when I go to Terminal
> and type in Python, it gives me the Apple-supplied variant. Will I
> need to adjust my environment settings to be able to work with the
> newly installed version?

The installer should update your $PATH environment variable to put the newly 
installed python executable before the system's if you use the bash shell. For 
example, it added this to my ~/.bash_profile file:

# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH


If you use a different shell, you may need to edit the appropriate file to add 
the above to the $PATH.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list