Can I have both Python 2.7 and Python 3.1 at the same time on the Mac?

Ned Deily nad at acm.org
Thu Jan 6 15:46:12 EST 2011


In article <775A9D45-25B5-4A16-9FE5-6217FD67F3AF at cagttraining.com>,
 Bill Felton <subscriptions at cagttraining.com> wrote:
> I'm new to python, trying to learn it from a variety of resources, including 
> references posted recently to this list.
> I'm going through /www.openbookproject.net/thinkCSpy/ and find it makes use 
> of gasp, which apparently is not compatible with 3.1.
> I've also seen various resources indicate that one can install both Python 
> 2.7 and Python 3.1 -- but when I did this, I get no end of problems in the 
> 2.7 install.  IDLE, in particular, fails rather spectacularly, even if I 
> launch it directly from the Python 2.7 directory in which it resides.
> So, either I've been misled and should only try to have one or the other.  OR 
> I'm missing some (probably simple) step that's mucking me up.
> Help?

Yes, you can have multiple versions of Python installed on Mac OS X.  In 
fact, Apple ships multiple versions of Python with OS X (2.6 and 2.6 
with OS X 10.6, for example).  Starting with Python 2.7, python.org 
offers two variants of OS X installers, one is 32-bit-only and works on 
all versions of OS X 10.3.9 through OS X 10.6, the other supports 64-bit 
execution and only works on 10.6 (as of 2.7.1).  Unfortunately, there 
are some major interaction problems between Tkinter, Python's GUI 
toolkit which is used by IDLE, and the Tcl/Tk 8.5 supplied by Apple in 
OS X 10.6.  I'm assuming you installed the 64-bit version.  If so, until 
the problem is resolved in the next maintenance release of Python 2.7, I 
suggest you download and install the 32-bit-only version of Python 2.7.1 
which does not have those problems.

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list