Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install the Swab library for Python 2.6 in Ubuntu 10.10.

However, I get the following error messages when I try to import it.

In the terminal I ran:

sudo easy_install swab
sudo easy_install Genshi

In the Python interpreter I ran:

>>> import swab
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/swab-0.1.2-py2.6.egg/swab/__init__.py", line 23, in <module>
    from pestotools.genshi import genshi, render_docstring
ImportError: cannot import name genshi

I don't know whats going on. can anyone help.

share|improve this question
    
It's worth seeing if the right files are there. What do you get for the following? "cd /usr/local/lib/python2.6/dist-packages/ && find -name pestotools* -print" –  ed. Sep 13 '11 at 14:25

1 Answer 1

I've run sudo easy_install swab in Ubuntu 10.10 and got all dependencies installed (no need to run sudo easy_install Genshi separately).

Unfortunately, when I look at pestotools module (installed in /usr/local/lib/python2.6/dist-packages/pestotools.genshi-0.2.3.py2.6.egg/pestotools/genshi/__init__.py in my system), I don't see any genshy or render_docstring.

This means that swab package is assuming that those symbols are present in pestotools.genshi namespace when they're not. I'd say that both packages went out of sync and that maybe some older version of pestotools.genshi still works fine together with swab. Anyway, the best way to make sure is to contact swab maintainer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.