Installation of multiple versions of Python on Unix

Gerhard Häring gerhard.haering at gmx.de
Sat Aug 31 21:19:15 EDT 2002


Lee Harr wrote in comp.lang.python:
> I have a very similar setup on a FreeBSD server (Zope still at 2.4.X tho
> as I have not had a chance to upgrade yet)
> 
> I just leave /usr/local/bin/python as a hard link to
> /usr/local/bin/python2.1 and run the other as /usr/local/bin/python2.2

Any reason not to use a symbolic link? Any reason to use a hard link
for anything, ever? I never needed one.

> One issue is building ports.

Erh. Really? <0.8 wink>

> Whenever I want to build a port to go with 2.2 (like I just added
> twisted python, for instance) I will change the plain python to link
> to python2.2 before I make and make install, then switch it back
> when I am done. That has no impact on the running Zope at all.

For the ports you want to build, use:

$ make PYTHON_VERSION=python2.1

to use the FreeBSD ports system instead of working around it ;-)

Look into /usr/ports/Mk/bsd.python.mk for why this works :-)

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9  3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list