lxml on python-3.3.0 ImportError: undefined symbol: xmlBufContent
Question: I am having a hard time installing lxml(3.1.0) on python-3.3.0. It installs
without errors and I can see the lxml-3.1.0-py3.3-linux-i686.egg in the
correct folder (/usr/local/lib/python3.3/site-packages/), but when I try to
import etree, I get this:

> > > from lxml import etree Traceback (most recent call last): File "", line
> 1, in ImportError: /usr/local/lib/python3.3/site-
> packages/lxml-3.1.0-py3.3-linux-i686.egg/lxml/etree.cpython-33m.so:
> undefined symbol: xmlBufContent

I did try to install with apt-get, I tried "python3 setup.py install" and I
did via easy_install. I have to mention that I have 3 versions installed (2.7,
3.2.3 and 3.3.0.), but I am too much of a beginner to tell if this has to do
with it.

I did search all over, but I could not find any solution to this. Any help is
greatly appreciated!

best, Uhru


Answer: You should probably mention the specific operating system you're trying to
install on, but I'll assume it's some form of Linux, perhaps Ubuntu or Debian
since you mention apt-get.

The error message you mention is typical on `lxml` when the `libxml2` and/or
`libxslt` libraries are not installed for it to link with. For whatever
reason, the install procedure does not detect when these are not present and
can give the sense the install has succeeded even though those dependencies
are not satisfied.

If you issue `apt-get install libxml2 libxml2-dev libxslt libxslt-dev` that
should eliminate this error.

