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 16:15:25 EST 2011


In article <4D261D2E.5070701 at verizon.net>,
 Gerry Reno <greno at verizon.net> wrote:
> On 01/06/2011 02:44 PM, Bill Felton wrote:
[...]
> > 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?
> You probably want to use 'virtualenv' for keeping things separated.

There are certainly good reasons to use virtualenv but simply to 
distinguish between Py2 and Py3 is not one of them.  There is no 
ambiguity, using a "standard" distribution on OS X or any other platform 
that I'm aware of, between Python 2 and Python 3 installations.  (Or, at 
least, any ambiguity that virtualenv would help resolve.)   While you 
could get into an ambiguous situation if you install things yourself and 
are not careful about which targets are installed (and some additional 
versioning endcases are being addressed in the upcoming Python 3.2 
release), all python3-related scripts and libraries are generally 
installed with different names (i.e. by adding a "3" somewhere) than 
their Python 2 counterparts.

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list