Parallel Python x.y.A and x.y.B installations on a single Windows machine

Albert-Jan Roskam fomcl at yahoo.com
Mon Nov 25 08:20:03 EST 2013


--------------------------------------------
On Mon, 11/25/13, Jurko Gospodnetić <jurko.gospodnetic at pke.hr> wrote:

 Subject: Parallel Python x.y.A and x.y.B installations on a single Windows machine
 To: python-list at python.org
 Date: Monday, November 25, 2013, 1:32 PM
 
   Hi all.
 
   I was wondering what is the best way to install
 multiple Python installations on a single Windows machine.
 
   Regular Windows installer works great as long as all
 your installations have a separate major.minor version
 identifier. However, if you want to have let's say 2.4.3
 & 2.4.4 installed at the same time it does not seem to
 work.
 
   I have not been able to find any prepackaged Python
 installation or really any solution to this. Most of the
 advice seems to boil down to 'do not use such versions
 together, use only the latest'.
 
   We would like to run automated tests on one of our
 projects (packaged as a Python library) with different
 Python versions, and since our code contains workarounds for
 several problems with specific Python patch versions, we'd
 really like to be able to run the tests with those specific
 versions and with as little fuss as possible.
 
   Looking at what the Python installer does, the only
 problematic part for working around this manually seems to
 be the registry entries under
 'Software\Python\PythonCore\M.m' where 'M.n' is the
 major.minor version identifier. If Python interpreter
 expects to always find its entries there, then I guess there
 is no way to do what we need without building customized
 Python executables. Is there a way to force a specific
 Python interpreter to not read in this information, read it
 from an .ini file or something similar?
 
HI Jurko,

Check out the following packages: virtualenv, virtualenvwrapper, tox
virtualenv + wrapper make it very easy to switch from one python version to another. Stricly speaking you don't need virtualenvwrapper, but it makes working with virtualenv a whole lot easier.Tox also uses virtualenv. You can configure it to sdist your package under different python versions. Also, you can make it run nosetests for each python version and/or implementation (pypy and jython are supported)

Albert-Jan 





More information about the Python-list mailing list