How To Install python2-lxml on Rocky Linux 8

In this tutorial we learn how to install python2-lxml on Rocky Linux 8. python2-lxml is XML processing library combining libxml2/libxslt with the ElementTree API

Introduction

In this tutorial we learn how to install python2-lxml on Rocky Linux 8.

What is python2-lxml

lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It provides safe and convenient access to these libraries using the ElementTree It extends the ElementTree API significantly to offer support for XPath, RelaxNG, XML Schema, XSLT, C14N and much more.To contact the project, go to the project home page < or see our bug tracker at case you want to use the current … Python 2 version.

We can use yum or dnf to install python2-lxml on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python2-lxml.

Install python2-lxml on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python2-lxml using dnf by running the following command:

sudo dnf -y install python2-lxml

Install python2-lxml on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python2-lxml using yum by running the following command:

sudo yum -y install python2-lxml

How To Uninstall python2-lxml on Rocky Linux 8

To uninstall only the python2-lxml package we can use the following command:

sudo dnf remove python2-lxml

python2-lxml Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/6d
/usr/lib/.build-id/6d/b4bfbfd0ca2aa61ce4473589f7690b5417ff6e
/usr/lib/.build-id/70
/usr/lib/.build-id/70/3b0ed674310ec82e01f279f96f74a253c7d060
/usr/lib/.build-id/b9
/usr/lib/.build-id/b9/f70ccad723ad31e460bca0058da49755a7deb6
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/4fed52a408f55f0f2757b03b2d5760a4cedaee
/usr/lib/.build-id/d6
/usr/lib/.build-id/d6/e9e41817a2f15723b4b78b1179c1b82294d82c
/usr/lib/.build-id/e7
/usr/lib/.build-id/e7/1b633ca6d0fc8ce6f0c16f20dc703057fdcb9f
/usr/lib64/python2.7/site-packages/lxml
/usr/lib64/python2.7/site-packages/lxml-4.2.3-py2.7.egg-info
/usr/lib64/python2.7/site-packages/lxml-4.2.3-py2.7.egg-info/PKG-INFO
/usr/lib64/python2.7/site-packages/lxml-4.2.3-py2.7.egg-info/SOURCES.txt
/usr/lib64/python2.7/site-packages/lxml-4.2.3-py2.7.egg-info/dependency_links.txt
/usr/lib64/python2.7/site-packages/lxml-4.2.3-py2.7.egg-info/not-zip-safe
/usr/lib64/python2.7/site-packages/lxml-4.2.3-py2.7.egg-info/requires.txt
/usr/lib64/python2.7/site-packages/lxml-4.2.3-py2.7.egg-info/top_level.txt
/usr/lib64/python2.7/site-packages/lxml/ElementInclude.py
/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyc
/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyo
/usr/lib64/python2.7/site-packages/lxml/__init__.py
/usr/lib64/python2.7/site-packages/lxml/__init__.pyc
/usr/lib64/python2.7/site-packages/lxml/__init__.pyo
/usr/lib64/python2.7/site-packages/lxml/_elementpath.py
/usr/lib64/python2.7/site-packages/lxml/_elementpath.pyc
/usr/lib64/python2.7/site-packages/lxml/_elementpath.pyo
/usr/lib64/python2.7/site-packages/lxml/_elementpath.so
/usr/lib64/python2.7/site-packages/lxml/builder.py
/usr/lib64/python2.7/site-packages/lxml/builder.pyc
/usr/lib64/python2.7/site-packages/lxml/builder.pyo
/usr/lib64/python2.7/site-packages/lxml/builder.so
/usr/lib64/python2.7/site-packages/lxml/cssselect.py
/usr/lib64/python2.7/site-packages/lxml/cssselect.pyc
/usr/lib64/python2.7/site-packages/lxml/cssselect.pyo
/usr/lib64/python2.7/site-packages/lxml/doctestcompare.py
/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyc
/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyo
/usr/lib64/python2.7/site-packages/lxml/etree.h
/usr/lib64/python2.7/site-packages/lxml/etree.so
/usr/lib64/python2.7/site-packages/lxml/etree_api.h
/usr/lib64/python2.7/site-packages/lxml/html
/usr/lib64/python2.7/site-packages/lxml/html/ElementSoup.py
/usr/lib64/python2.7/site-packages/lxml/html/ElementSoup.pyc
/usr/lib64/python2.7/site-packages/lxml/html/ElementSoup.pyo
/usr/lib64/python2.7/site-packages/lxml/html/__init__.py
/usr/lib64/python2.7/site-packages/lxml/html/__init__.pyc
/usr/lib64/python2.7/site-packages/lxml/html/__init__.pyo
/usr/lib64/python2.7/site-packages/lxml/html/_diffcommand.py
/usr/lib64/python2.7/site-packages/lxml/html/_diffcommand.pyc
/usr/lib64/python2.7/site-packages/lxml/html/_diffcommand.pyo
/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.py
/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyc
/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyo
/usr/lib64/python2.7/site-packages/lxml/html/_setmixin.py
/usr/lib64/python2.7/site-packages/lxml/html/_setmixin.pyc
/usr/lib64/python2.7/site-packages/lxml/html/_setmixin.pyo
/usr/lib64/python2.7/site-packages/lxml/html/builder.py
/usr/lib64/python2.7/site-packages/lxml/html/builder.pyc
/usr/lib64/python2.7/site-packages/lxml/html/builder.pyo
/usr/lib64/python2.7/site-packages/lxml/html/clean.py
/usr/lib64/python2.7/site-packages/lxml/html/clean.pyc
/usr/lib64/python2.7/site-packages/lxml/html/clean.pyo
/usr/lib64/python2.7/site-packages/lxml/html/clean.so
/usr/lib64/python2.7/site-packages/lxml/html/defs.py
/usr/lib64/python2.7/site-packages/lxml/html/defs.pyc
/usr/lib64/python2.7/site-packages/lxml/html/defs.pyo
/usr/lib64/python2.7/site-packages/lxml/html/diff.py
/usr/lib64/python2.7/site-packages/lxml/html/diff.pyc
/usr/lib64/python2.7/site-packages/lxml/html/diff.pyo
/usr/lib64/python2.7/site-packages/lxml/html/diff.so
/usr/lib64/python2.7/site-packages/lxml/html/formfill.py
/usr/lib64/python2.7/site-packages/lxml/html/formfill.pyc
/usr/lib64/python2.7/site-packages/lxml/html/formfill.pyo
/usr/lib64/python2.7/site-packages/lxml/html/html5parser.py
/usr/lib64/python2.7/site-packages/lxml/html/html5parser.pyc
/usr/lib64/python2.7/site-packages/lxml/html/html5parser.pyo
/usr/lib64/python2.7/site-packages/lxml/html/soupparser.py
/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyc
/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyo
/usr/lib64/python2.7/site-packages/lxml/html/usedoctest.py
/usr/lib64/python2.7/site-packages/lxml/html/usedoctest.pyc
/usr/lib64/python2.7/site-packages/lxml/html/usedoctest.pyo
/usr/lib64/python2.7/site-packages/lxml/includes
/usr/lib64/python2.7/site-packages/lxml/includes/__init__.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/__init__.py
/usr/lib64/python2.7/site-packages/lxml/includes/__init__.pyc
/usr/lib64/python2.7/site-packages/lxml/includes/__init__.pyo
/usr/lib64/python2.7/site-packages/lxml/includes/c14n.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/config.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/dtdvalid.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/etree_defs.h
/usr/lib64/python2.7/site-packages/lxml/includes/etreepublic.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/htmlparser.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/lxml-version.h
/usr/lib64/python2.7/site-packages/lxml/includes/relaxng.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/schematron.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/tree.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/uri.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/xinclude.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/xmlerror.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/xmlparser.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/xmlschema.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/xpath.pxd
/usr/lib64/python2.7/site-packages/lxml/includes/xslt.pxd
/usr/lib64/python2.7/site-packages/lxml/isoschematron
/usr/lib64/python2.7/site-packages/lxml/isoschematron/__init__.py
/usr/lib64/python2.7/site-packages/lxml/isoschematron/__init__.pyc
/usr/lib64/python2.7/site-packages/lxml/isoschematron/__init__.pyo
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/rng
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/rng/iso-schematron.rng
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl
/usr/lib64/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
/usr/lib64/python2.7/site-packages/lxml/lxml.etree.h
/usr/lib64/python2.7/site-packages/lxml/lxml.etree_api.h
/usr/lib64/python2.7/site-packages/lxml/objectify.so
/usr/lib64/python2.7/site-packages/lxml/pyclasslookup.py
/usr/lib64/python2.7/site-packages/lxml/pyclasslookup.pyc
/usr/lib64/python2.7/site-packages/lxml/pyclasslookup.pyo
/usr/lib64/python2.7/site-packages/lxml/sax.py
/usr/lib64/python2.7/site-packages/lxml/sax.pyc
/usr/lib64/python2.7/site-packages/lxml/sax.pyo
/usr/lib64/python2.7/site-packages/lxml/usedoctest.py
/usr/lib64/python2.7/site-packages/lxml/usedoctest.pyc
/usr/lib64/python2.7/site-packages/lxml/usedoctest.pyo
/usr/share/doc/python2-lxml
/usr/share/doc/python2-lxml/README.rst
/usr/share/doc/python2-lxml/readme.txt
/usr/share/licenses/python2-lxml
/usr/share/licenses/python2-lxml/LICENSES.txt
/usr/share/licenses/python2-lxml/ZopePublicLicense.txt

References

Summary

In this tutorial we learn how to install python2-lxml on Rocky Linux 8 using yum and dnf.