Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10340
| References | <j0l14e$cuh$1@dough.gmane.org> <mailman.1482.1311646720.1164.python-list@python.org> <75342033-abbb-4d59-9654-96d5031dcb62@r28g2000prb.googlegroups.com> <4e2ee2dd$0$7291$426a74cc@news.free.fr> <CAL_Nh-xfr50Unhz-5otoNa6qai1P+8_+z0cJfrLXF1tbNgP21w@mail.gmail.com> |
|---|---|
| Date | 2011-07-27 03:07 +1000 |
| Subject | Re: ActivePython: multiple versions on OSX? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1500.1311700055.1164.python-list@python.org> (permalink) |
On Wed, Jul 27, 2011 at 2:33 AM, Melton Low <softw.devl@gmail.com> wrote: > 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). You could set up a script for each version that looks for environment variables in the right order, stopping when it finds one. Version 3.2.1 would look for PYTHON321PATH, then PYTHON32PATH, then PYTHON3PATH, finally falling back on PYTHONPATH. It could then put the appropriate path into PYTHONPATH (not overwriting the external variable of the same name - if your shell doesn't do that for you, just save it to restore later), and invoke Python. Still seems fairly cumbersome, and doesn't handle the possibility of having two separate installs of the same version number (different builds of 3.3, or 32-bit and 64-bit Pythons, or something). It may be easier to simply create some scripts that set up the environment explicitly, and then invoke Python. Name 'em according to what you want of them. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: ActivePython: multiple versions on OSX? Ned Deily <nad@acm.org> - 2011-07-25 19:18 -0700
Re: ActivePython: multiple versions on OSX? John Roth <johnroth1@gmail.com> - 2011-07-26 05:00 -0700
Re: ActivePython: multiple versions on OSX? Web Dreamer <webdreamer@nospam.fr> - 2011-07-26 17:53 +0200
Re: ActivePython: multiple versions on OSX? Chris Angelico <rosuav@gmail.com> - 2011-07-27 03:07 +1000
Re: ActivePython: multiple versions on OSX? Ned Deily <nad@acm.org> - 2011-07-26 11:41 -0700
csiph-web