Installing two different versions of Python on Windows

David Bolen db3l at fitlinxx.com
Tue Jan 29 03:29:03 CET 2002


Sheila King <usenet at thinkspot.net> writes:

> If I simply take care to install the new Python 2.2 version in a separate
> directory, this should work OK, shouldn't it? I know that the system will
> default associate all the .py, .pyc, and .pyw files with the 2.2 executable
> and I would have to specifically invoke the 2.1 executable with a full path
> name if I wanted to run it, but that's fine, too. I expect I'll mostly use
> the newer 2.2.

Yes, the two "collisions" between multiple versions are both registry
based.  One is the file extension association, and the other is the
COM object server registration for active scripting and some default
objects that the win32all package can install.  Both can be manually
tweaked with regedit to flip between versions if you need.

Standard Python (although not the PythonWare distribution) does use
the registry for basic stuff too, but it uses version-specific keys,
so they won't collide.  You can't have two bug releases of the same
version (e.g., Python 2.1.1 and 2.1.2 since only the major.minor is
used in the registry), but otherwise you're fine.

And yes, you can play any tricks you want to select between the
executable - switching paths, renaming python.exe in each installation
to python##.exe, setting up aliases or batch files to run the
appropriate version, etc...

I keep all of 1.5.2, 2.0, 2.1 and 2.2 on my system for
interoperability testing and it works fine.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list