[Distutils] Craziness in dependency checking of PyXML version

Phillip J. Eby pje at telecommunity.com
Tue Jan 15 01:50:32 CET 2008

At 06:56 PM 1/14/2008 -0500, Stanley A. Klein wrote:
>I'm trying to fix something running under ZSI that broke because of a
>needed change in the WS-Addressing schema version.
>I ran into a problem that I've had before, where Python can't recognize
>that I have a proper version of PyXML installed.
>I get the following traceback:
>[stan at localhost wsdl]$ wsdl2py -help
>Traceback (most recent call last):
>   File "/usr/bin/wsdl2py", line 5, in <module>
>     from pkg_resources import load_entry_point
>   File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2561, in
>     working_set.require(__requires__)
>   File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in
>     needed = self.resolve(parse_requirements(requirements))
>   File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in
>     raise DistributionNotFound(req)  # XXX put more info here
>pkg_resources.DistributionNotFound: PyXML>=0.8.3
>What I have installed as an rpm is PyXML-0.8.4-6.
>I've had this problem before with the PyXML version in another context,
>probably trying to install ZSI as an egg in my user lib directory.
>Is there an easy fix for this?

Yes: convince the organization that creates your RPMs not to remove 
the .egg-info files that the distutils generates, specifically so 
that system-installed packages can be detected programmatically, 
without needing to understand every single distribution format in existence.

Or, failing that, create an empty "PyXML-0.8.4-py2.5.egg-info" file 
alongside the top-level modules or packages that were installed by the RPM.  :)

More information about the Distutils-SIG mailing list