[lxml-dev] ImportError: No module named html
Stefan Behnel
stefan_ml at behnel.de
Thu Jan 29 07:37:24 CET 2009
Hi,
Philip Gillhaus wrote:
> Sorry if this is the wrong place for a question like this. I'm
> somewhat new to Python, so this may just be a simple mistake on my
> end.
>
> After installing lxml on my Ubuntu box using the synaptic package
> manager, I have access to the etree module and the objectify module,
> but when I attempt to import the html module I get an error that looks
> like this:
>
>>>> from lxml.html import fromstring
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: No module named html
>
> I had the same problem on my windows box after installing from a
> binary. Any insight would be greatly appreciated.
You forgot to say which version you are installing. lxml.html was added in
lxml 2.0.
It's also possible that you have a package called "lxml" lying around
somewhere in your PYTHONPATH that prevents Python from finding the real
lxml package.
Stefan
More information about the lxml-dev
mailing list