lxml is a Python library which allows for easy handling of XML and HTML files, and can also be used for web scraping. There are a lot of off-the-shelf XML parsers out there, but for better results, developers sometimes prefer to write their own XML and HTML parsers.
The latest version is lxml 4.9. 1, released 2022-07-01 (changes for 4.9. 1). Older versions are listed below.
Open your Linux terminal or shell. Type “ pip install lxml ” (without quotes), hit Enter. If it doesn't work, try "pip3 install lxml" or “ python -m pip install lxml “.
In case you want to use the current in-development version of lxml, you can get it from the github repository at https://github.com/lxml/lxml . Note that this requires Cython to build the sources, see the build instructions on the project home page.
I had the same issue, I managed to install it after installing the package libxslt-devel
and python-devel
which seems to be your problem:
yum install libxslt-devel python-devel
python setup.py install
Installed /usr/lib/python2.6/site-packages/lxml-2.2.8-py2.6-linux-i686.egg
Processing dependencies for lxml==2.2.8
Finished processing dependencies for lxml==2.2.8
However since I also installed other packages in the process, you might want to double check libxml2
, libxml2-devel
and libxslt
while you are at it.
Here is some information on how to build lxml: http://lxml.de/build.html
It solved my problem for nokogiri in Centos
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With