[Distutils] pkg_resource require does not seem to find my egg
Nicholas Veeser
nicholas at metaweb.com
Tue Apr 7 02:04:55 CEST 2009
I am working on a tool we call dino which uses sqlalchemy 0.5.3
Its an update of a previous version (called dino) which uses sqlalchemy
0.4.4.
For reasons I don't have to go into, I would like to have both tools
installed on the same host,
with almost no changes to the existing tool. Thus both versions of
sqlalchemy installed
So my solution seemed to be use pkg_resources and egg's:
- leave sqlalchemy 0.4.4 in:
/usr/lib64/python2.4/site-packages/sqlalchemy
- build sqlalchemy 0.5.3 as an Egg and install into:
/usr/lib64/python2.4/site-packages/SQLAlchemy-0.5.3-py2.4.egg
- in the root package of the new code, specify the correct version
from pkg_resources import require; require("SQLAlchemy>=0.5.0")
This does not work.
It does not seem to find the egg, and only finds the old version, and
then (correctly) fails.
Trying to read through the pkg_resource.py, I am trying to make sense
why this is, and
how to get around it. I am having trouble wrapping my head around some
of the terms...
Am I doing something obviously wrong?
Is there a known bug?
I have installed setuptools-0.6_rc7
Here is the traceback
Traceback (most recent call last):
File "/usr/bin/dinoadm", line 8, in ?
import dino.cmd.cli
File "/usr/lib64/python2.4/site-packages/dino/__init__.py", line 6, in ?
require("SQLAlchemy>=0.5.0")
File "/usr/lib64/python2.4/site-packages/pkg_resources.py", line 626,
in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib64/python2.4/site-packages/pkg_resources.py", line 528,
in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (SQLAlchemy 0.4.4
(/usr/lib64/python2.4/site-packages),
Requirement.parse('SQLAlchemy>=0.5.0'))
Thanx
Nicholas
More information about the Distutils-SIG
mailing list