Installing a second version of an existing package

Derek Fountain nomail at hursley.ibm.com
Wed Oct 29 03:02:20 EST 2003


> 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.

I built it as normal, then renamed the PIL directory in the build tree to
PIL114, then tweaked the installation to copy that directory instead of the
original PIL one. The two now exist side by side in the libraries tree.

Python picks up PIL before PIL114, which is good, since the OS is based
around PIL. For my script I used a hack: I just removed the PIL directory
from sys.path before the import so it finds modules in PIL114. :o) That's
not a long term solution but it'll do for now.




More information about the Python-list mailing list