Installing a second version of an existing package

Fredrik Lundh fredrik at pythonware.com
Tue Oct 28 15:43:20 EST 2003


Derek Fountain wrote:

> Is it possible to install a second version of an existing package? My SUSE
> Linux box has PIL-1.1.3 installed, and this is used by the OS for various
> tasks. It's bundled as part of a "python-imaging" package, which includes
> tkinter and other stuff. Removing it causes widespread damage!
>
> I want to install PIL-1.1.4, since I need the EXIF stuff. Is it possible to
> install PIL-1.1.4 alongside PIL-1.1.3? If so, how do I go about it, and how
> do I ensure my script runs the version of the library I want?

keeping the PIL PY files in a separate directory is trivial (just build PIL
as usual, and put the PIL/*.py stuff in, say, site-packages/PIL114),
but preventing 1.1.4 from picking up the binary files for 1.1.3 might
be harder.

on the other hand, I'm pretty sure that 1.1.4's JpegImagePlugin.py file
works with 1.1.3's binaries.  in other words, this might work:

    1) make a backup copy of the 1.1.3 installation directory
    2) copy 1.1.4's JpegImagePlugin.py to the 1.1.3 installation directory
    3) copy 1.1.4's ExifTags.py to the 1.1.3 installation directory
    4) ????
    5) profit!

</F>








More information about the Python-list mailing list