[Tutor] OSX and installation of new Python versions

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Sep 27 09:20:05 CEST 2004



On Fri, 24 Sep 2004, Christian Meesters wrote:

> Is there a way to install 2.4 or 2.3.4 on the Mac (OSX 10.3.5) so that
> there is only one Python version?

Hi Christian,

I would not replace the current version of Python on your system.  Mac OS
Panther uses Python 2.3 to drive some Quartz stuff, and those modules are
probably not ported to 2.4 yet.  And 2.4 isn't even out of alpha yet!
*grin* So I'd strongly recommend leaving Apple's version of Python on your
system.


But what you can do is install a local copy of Python somewhere, and then
point your personal PATH so that your customized copy takes precedence in
your own programs.


> whereas any other version explicitly has to be called with the full
> path. Installing third party modules like wxPython and numarray isn't
> fun this way.

If you install Python to the default location ('/usr/local'), things might
not be so bad.  You can put '/usr/local/' in your path, and then start up
Python by using:

    $ python2.4

This makes sure that we're getting at Python 2.4, and not the one under
/usr/bin.

(Apple actually keeps Python 2.3 in:

    /System/Library/Frameworks/Python.framework/Versions/2.3/bin/python

and they seem to be pretty good about following the right version of
Python so far.  I wouldn't be surprised if Tiger brings Python 2.4 along
for the ride.)


> Any ideas how to achieve all this? (Parameters during setup and
> compiling?) Frankly: The MacPython FAQ didn't help me any further and I
> fear I have to live with this until Apple will include an updated
> version in its OS. Or do I?

Default parameters during compilation should work.  The installed version
will end up living in '/usr/local/'.  You can redirect this to some other
place by adding a '--prefix' flag during the './configure' step when you
compile Python.


> And one last question: If there is any solution - what will be the
> impact on pythonw?

I'm not sure; I haven't noticed anything funny yet, but I'm still
tinkering with Tkinter.  *grin*


You should probably talk to folks on the PythonMac-SIG group. I'm sure
that there are a lot of other MacPython users on that list that can help
you get Python 2.4 set up nicely, or to work with wxPython on Macs.
Here's a link to their mailing list:

    http://www.python.org/sigs/pythonmac-sig/


Best of wishes to you!



More information about the Tutor mailing list