[Distutils] Problem importing pylirc egg
Phillip J. Eby
pje at telecommunity.com
Mon Apr 24 21:03:05 CEST 2006
At 05:46 PM 4/24/2006 +0200, Philippe Normand wrote:
>Hi,
>
>i've easy_installed pylirc from sourceforge as an Egg. It's correctly
>compiled/installed on my system. But i can't import it, though it's
>found by pkg_resources:
>
> >>> import pylirc
>Traceback (most recent call last):
>File "<stdin>", line 1, in ?
>ImportError: No module named pylirc
> >>> import pkg_resources
> >>> pkg_resources.require('pylirc')
>[pylirc 0.0.5
>(/home/phil/lib/python2.4/pylirc-0.0.5-py2.4-linux-i686.egg)]
>
>What am i supposed to do with that Requirement object so as to get
>pylirc module in my namespace ?
Try "import pylircmodule" - it looks like this may be a bug in building
compressed eggs; if an extension module in a zipfile ends with 'module',
the bdist_egg command probably isn't stripping the word 'module' from the
loader name.
If that works, try reinstalling the egg using -Z (or --always-unzip), and
see if you can just use "import pylirc". In that case, it is indeed a bug
in bdist_egg.
More information about the Distutils-SIG
mailing list