Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (45 sloc) 2.47 KB
Installing lxml
You need Python 2.3 or later.
You need libxml2 and libxslt, in particular:
* libxml 2.6.16 or later. It can be found here:
* libxslt 1.1.12 or later. It can be found here:
Newer versions generally contain less bugs and are therefore recommended. The
HTML parser benefits from libxml2 version 2.6.21 or later, which support
parsing horribly broken HTML.
For Windows, there is a `binary distribution`_ of libxml2 and libxslt. Note
that you need both libxml2 and libxslt, as well as iconv and zlib. You can
then install the `binary egg distribution`_ of lxml (see below).
.. _`binary distribution`:
.. _`binary egg distribution`:
On MacOS-X 10.4, you can use the installed system libraries and the binary egg
distribution of lxml. Note that the libxslt version on this system is older
than the required version above. While there were not any bug reports so far,
you may still encounter certain differences in behaviour in rare cases.
If you want to build lxml from SVN, you also need Pyrex_. Please read `how to
build lxml from source`_ in this case. If you are using a released version of
lxml, it should come with the generated C file in the source distribution, so
no Pyrex is needed in that case.
.. _Pyrex:
.. _`how to build lxml from source`: build.html
Note that Pyrex up to and including version 0.9.4 has known problems when
compiling lxml with gcc 4.0 or Python 2.4. Do not use it. If you want to
build lxml from non-release sources, please install Pyrex version or
If you have read these instructions and still cannot manage to install lxml,
you can check the archives of the `mailing list`_ to see if your problem is
known or otherwise send a mail to the list.
.. _`mailing list`:
If you have easy_install_, you can run the following as super-user::
easy_install lxml
.. _easy_install:
This has been reported to work on Linux, MacOS-X 10.4 and Windows, as long as
libxml2 and libxslt are properly installed. To compile and install lxml
without easy_install, please read `how to build lxml from source`_ (or the
file ``build.txt`` in the ``doc`` directory of the source tree).
Jump to Line
Something went wrong with that request. Please try again.