[Tutor] Upgrading 2.2 to 2.3

Tim Peters tutor@python.org
Sun Aug 3 13:29:02 EDT 2003

[R. Alan Monroe]
> I can't find any info on upgrading on python.org. Am I supposed to:
> a) put 2.3 over 2.2 in the same folder?
> b) uninstall 2.2 then install 2.3?
> c) install 2.3 in a new folder (what happens to all my old
>    site-packages?) ?
> d) something I hadn't thought of?
> This is on Windows 2000 FWIW.

It varies across platforms.  On Windows (any flavor, Win9x, Win2K, etc), you
can have any number of different "minor" Python releases installed
simultaneously.  "minor" == the second digit, so, e.g., I have Python 2.2.1,
2.2.3, and 2.3 all installed on my Windows box.

Windows only allows .py files to be associated with one executable, though,
and the most recent Python you installed wins.  You can use the "Advanced"
options dialog in the installer to avoid associating file extensions.

Putting 2.3. over 2.2 in the same folder is a bad idea.  Don't try it.
Nobody tests it that way (I build the Windows installer for PythonLabs, so
you can believe me when I see it sure isn't tested here <wink>).

If you install 2.3 into a new directory, it doesn't matter whether you
uninstall 2.2 -- suit yourself.

In any case, anything in site-packages containing a C extension (a .pyd
file) is incompatible across minor releases on Windows:  an extension built
for 2.2.x cannot be used with 2.1.y or 2.3.z.  You'll need to install new
versions of extensions for use with 2.3.  This part of the story is worse
than it is on most other platforms, but the dirty details under the covers
that prevent extensions from working with multiple minor versions of Python
on Windows are the same dirty details that *allow* you to have any number of
minor Python releases installed simultaneously on Windows.  It's a tradeoff,
and one that may or may not have been made in the particular way you prefer.

More information about the Tutor mailing list