Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/", 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

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/ 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


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.