[MacOS] Multiple versions of a module

Diez B. Roggisch deets at nospam.web.de
Sun Jan 25 11:17:40 EST 2009


Pierre-Alain Dorange schrieb:
> How to manage a module with several versions on MacOS X ?
> 
> All modules are installed in :
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pa
> ckages/"
> This is the default path for Mac.
> 
> But for some modules i need several version (stable 1.8.1 and test 1.9.0
> for example : for pygame here).
> 
> I've installed the stable one from source and i go into a
> "pygame-1.8.0release-py2.5-macosx-10.3-i386.egg" directory. Nice.
> 
> I just install the 1.9 (for test) and it go into "pygame" directory
> 
> So now  i got 2 versions of pygame in the site-packages dir...
> 
> When i import "pygam
> e" from python, the 1.8.0 is imported only and 1.9.0 is complely
> ignored... How do python choose from several package ? 
> Do package register them elsewhere ?
> I don't know how to test (temporaly) the 1.9, but also be able to go
> back easily to 18.8 after ?
> 
> I do a site._test() and i return my only 1.8.0 module for pygame, 1.9.0
> is ignored. The same with

Use the excellent virtualenv-package from Ian Bicking.

http://pypi.python.org/pypi/virtualenv

Nowaday,s nearly everything I develop first gets it's own VE before 
anything is installed.

Diez



More information about the Python-list mailing list