[Distutils] Two versions of SQLAlchemy side-by-side?

Alexander Michael lxander.m at gmail.com
Tue Apr 29 17:29:34 CEST 2008


The quick hack to request a version, good to use in the interpreter or
a "throw-away" script:

import pkg_resources
pkg_resources.require('SQLAlchemy==0.4.5')
import sqlalchemy

This works when the directory that SQLAlchemy-0.4.5-py2.4.egg is in is
listed in sys.path.

On Tue, Apr 29, 2008 at 11:11 AM,  <skip at pobox.com> wrote:
> We have SQLAlchemy 0.3.3 installed via setuptools.  I upgraded to 0.4.5
>  today but had to back that out (by editing easy-install.pth) because of API
>  changes.  Now I have these two installs
>
>     .../site-packages/SQLAlchemy-0.3.3-py2.4.egg
>     .../site-packages/SQLAlchemy-0.4.5-py2.4.egg
>
>  Is there a way to import the 0.4.5 version for testing without disturbing
>  the 0.3.3 version?  I tried placing the 0.4.5 egg directory in PYTHONPATH
>  but I still get the 0.3.3 version when I "import sqlalchemy".
>
>  What's a fella to do?
>
>  Thanks,
>
>  Skip
>
>  _______________________________________________
>  Distutils-SIG maillist  -  Distutils-SIG at python.org
>  http://mail.python.org/mailman/listinfo/distutils-sig
>


More information about the Distutils-SIG mailing list