Philippe Normand wrote:
> Le 24/4/2006, "Ian Bicking" <[EMAIL PROTECTED]> a écrit:
> 
> 
>>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 ?
>>
>>You have to require and then import:
>>
>>import pkg_resources
>>pkg_resources.require('pylirc')
>>import pylirc
>>
> 
> 
> Even after requiring the package, i get an ImportError ;(
> 
> 
>>>>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's in /home/phil/lib/python2.4/pylirc-0.0.5-py2.4-linux-i686.egg ? 
What does your sys.path look like after you do the require()?  That path 
should be on your sys.path after require(), and it should contain 
pylirc/__init__.py (or be a zip file that includes pylirc/__init__.py).


-- 
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to