I've installed lxml, but I get an error when I try to use lxml.html.clean.clean_html:
It seems there is a problem with the etree module. Any ideas of how to fix this? asked 28 May '11, 11:38 anarres |
In reply to David, I installed lxml like this:
A lot of code ran down the screen and then I got a message that the file /home/anarres/lib/python2.4/lxml-2.3-py2.7-linux-i686.egg had been created. So I did this:
And I got the following response:
permanent link
This answer is marked "community wiki".
answered 28 May '11, 12:23 anarres You installed it to python2.4 Replace the easy_install command with, easy_install-2.7
(28 May '11, 12:32)
johns
|
Thanks, per the suggestion from Johns I tried to install lxml to python-2.7, but I'm still getting the same problem. I did this:
and got this response:
But when I try to import etree I still get an error.
answered 28 May '11, 13:09 anarres |
Remove the current egg and than use a different egg or the default egg,
answered 28 May '11, 13:19 johns Thanks very much, it works now. I guess I just needed to delete the old .egg directory.
(30 May '11, 06:48)
anarres
|
I just installed lxml for Python2.7 in a test account and ran the same import without getting this traceback.
How did you install lxml?