ActivePython: multiple versions on OSX?

Melton Low softw.devl at gmail.com
Tue Jul 26 18:33:22 CEST 2011


On Tue, Jul 26, 2011 at 9:53 AM, Web Dreamer <webdreamer at nospam.fr> wrote:

> John Roth a écrit ce mardi 26 juillet 2011 14:00 dans <75342033-
> abbb-4d59-9654-96d5031dcb62 at r28g2000prb.googlegroups.com> :
>
> > On Jul 25, 8:18 pm, Ned Deily <n... at acm.org> wrote:
> >> In article <j0l14e$cu... at dough.gmane.org>, Robert <sigz... at gmail.com>
> >> wrote:
> >>
> >> > Is it possible to install the 2 and 3 series side by side?
> [...]
> > When you do, you might also want to look at PEP 394:
> > http://www.python.org/dev/peps/pep-0394/
> >
> > It can simplify writing scripts which select the version you want.
>
>
> http://www.python.org/dev/peps/pep-0394/#impact-on-python-environment-variables
> What would be a nice feature would be having:
> PYTHONPATH (and PYTHONHOME, etc) referring to all versions, and to allow
> having PYTHON2PATH, PYTHON2HOME (and PYTHON3PATH, PYTHON3HOME), etc... for
> the specific versions.
> This would allow having global variables for all versions, and special
> variables for specific versions, to allow more flexibility.
> Or would it be silly?
>
> --
> Web Dreamer
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

It's probably impractical.  You would need a pair for each version of Python
installed, ie. (PYTHON26PATH,PYTHON26HOME) for 2.6.x,
(PYTHON27PATH,PYTHON27HOME) for 2.7.x, .... for 3.1.x, for 3.2.x, etc).  Not
just one set for the 2.x series and another for the 3.x series.  Some
developer may have 2.5.x, 2.6.x, 2.7.x, 3.1.x and 3.2.x installed.  These
environment variables have to be set somewhere, probably in your personal
shell startup script or the system-wide shell startup script, which have to
be maintained.  Even with all those environment variables set, you would
still have to invoke the version of Python you want in order for it to
pickup the variable.

On Mac OS X, a link is automatically installed in /usr/local/bin for each
version of the Python executables, ie python2.7 for the 2.7.x  and python3.2
for 3.2.x.  Just invoke your script with the appropriate Python version.
 eg. python3.2 yourscript to run 'yourscript'.

Other people will have different ideas.

Cheer, Mel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110726/edb33470/attachment.html>


More information about the Python-list mailing list