How To Install python3-lxml on Rocky Linux 8

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

Introduction

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

What is python3-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 3 version.

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

Install python3-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 python3-lxml using dnf by running the following command:

sudo dnf -y install python3-lxml

Install python3-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 python3-lxml using yum by running the following command:

sudo yum -y install python3-lxml

How To Uninstall python3-lxml on Rocky Linux 8

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

sudo dnf remove python3-lxml

python3-lxml Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/16
/usr/lib/.build-id/16/c75b05c660455210b576a8b60c3670f9178110
/usr/lib/.build-id/34
/usr/lib/.build-id/34/7ec2581cc4f433c516658dbc40f607ee03fca0
/usr/lib/.build-id/63
/usr/lib/.build-id/63/a2bf60b6b1168e35f5c38bb523f8fb8b321c3f
/usr/lib/.build-id/92
/usr/lib/.build-id/92/1a037ac069b7efa1701420b3ba86d5ad8fe773
/usr/lib/.build-id/9d
/usr/lib/.build-id/9d/019152660dfa3bbc2aad5a741de0dcf0b81ce1
/usr/lib/.build-id/c3
/usr/lib/.build-id/c3/a9305fab315bf9217612d140a9566aa800dfdf
/usr/lib64/python3.6/site-packages/lxml
/usr/lib64/python3.6/site-packages/lxml-4.2.3-py3.6.egg-info
/usr/lib64/python3.6/site-packages/lxml-4.2.3-py3.6.egg-info/PKG-INFO
/usr/lib64/python3.6/site-packages/lxml-4.2.3-py3.6.egg-info/SOURCES.txt
/usr/lib64/python3.6/site-packages/lxml-4.2.3-py3.6.egg-info/dependency_links.txt
/usr/lib64/python3.6/site-packages/lxml-4.2.3-py3.6.egg-info/not-zip-safe
/usr/lib64/python3.6/site-packages/lxml-4.2.3-py3.6.egg-info/requires.txt
/usr/lib64/python3.6/site-packages/lxml-4.2.3-py3.6.egg-info/top_level.txt
/usr/lib64/python3.6/site-packages/lxml/ElementInclude.py
/usr/lib64/python3.6/site-packages/lxml/__init__.py
/usr/lib64/python3.6/site-packages/lxml/__pycache__
/usr/lib64/python3.6/site-packages/lxml/__pycache__/ElementInclude.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/ElementInclude.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/_elementpath.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/_elementpath.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/builder.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/builder.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/cssselect.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/cssselect.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/doctestcompare.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/doctestcompare.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/pyclasslookup.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/pyclasslookup.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/sax.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/sax.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/usedoctest.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/__pycache__/usedoctest.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/_elementpath.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/lxml/_elementpath.py
/usr/lib64/python3.6/site-packages/lxml/builder.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/lxml/builder.py
/usr/lib64/python3.6/site-packages/lxml/cssselect.py
/usr/lib64/python3.6/site-packages/lxml/doctestcompare.py
/usr/lib64/python3.6/site-packages/lxml/etree.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/lxml/etree.h
/usr/lib64/python3.6/site-packages/lxml/etree_api.h
/usr/lib64/python3.6/site-packages/lxml/html
/usr/lib64/python3.6/site-packages/lxml/html/ElementSoup.py
/usr/lib64/python3.6/site-packages/lxml/html/__init__.py
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/ElementSoup.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/ElementSoup.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/_diffcommand.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/_diffcommand.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/_html5builder.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/_html5builder.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/_setmixin.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/_setmixin.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/builder.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/builder.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/clean.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/clean.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/defs.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/defs.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/diff.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/diff.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/formfill.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/formfill.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/html5parser.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/html5parser.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/soupparser.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/soupparser.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/usedoctest.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/html/__pycache__/usedoctest.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/html/_diffcommand.py
/usr/lib64/python3.6/site-packages/lxml/html/_html5builder.py
/usr/lib64/python3.6/site-packages/lxml/html/_setmixin.py
/usr/lib64/python3.6/site-packages/lxml/html/builder.py
/usr/lib64/python3.6/site-packages/lxml/html/clean.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/lxml/html/clean.py
/usr/lib64/python3.6/site-packages/lxml/html/defs.py
/usr/lib64/python3.6/site-packages/lxml/html/diff.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/lxml/html/diff.py
/usr/lib64/python3.6/site-packages/lxml/html/formfill.py
/usr/lib64/python3.6/site-packages/lxml/html/html5parser.py
/usr/lib64/python3.6/site-packages/lxml/html/soupparser.py
/usr/lib64/python3.6/site-packages/lxml/html/usedoctest.py
/usr/lib64/python3.6/site-packages/lxml/includes
/usr/lib64/python3.6/site-packages/lxml/includes/__init__.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/__init__.py
/usr/lib64/python3.6/site-packages/lxml/includes/__pycache__
/usr/lib64/python3.6/site-packages/lxml/includes/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/includes/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/includes/c14n.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/config.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/dtdvalid.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/etree_defs.h
/usr/lib64/python3.6/site-packages/lxml/includes/etreepublic.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/htmlparser.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/lxml-version.h
/usr/lib64/python3.6/site-packages/lxml/includes/relaxng.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/schematron.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/tree.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/uri.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/xinclude.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/xmlerror.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/xmlparser.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/xmlschema.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/xpath.pxd
/usr/lib64/python3.6/site-packages/lxml/includes/xslt.pxd
/usr/lib64/python3.6/site-packages/lxml/isoschematron
/usr/lib64/python3.6/site-packages/lxml/isoschematron/__init__.py
/usr/lib64/python3.6/site-packages/lxml/isoschematron/__pycache__
/usr/lib64/python3.6/site-packages/lxml/isoschematron/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/lxml/isoschematron/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/rng
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/rng/iso-schematron.rng
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl
/usr/lib64/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
/usr/lib64/python3.6/site-packages/lxml/lxml.etree.h
/usr/lib64/python3.6/site-packages/lxml/lxml.etree_api.h
/usr/lib64/python3.6/site-packages/lxml/objectify.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/lxml/pyclasslookup.py
/usr/lib64/python3.6/site-packages/lxml/sax.py
/usr/lib64/python3.6/site-packages/lxml/usedoctest.py
/usr/share/doc/python3-lxml
/usr/share/doc/python3-lxml/README.rst
/usr/share/doc/python3-lxml/readme.txt
/usr/share/licenses/python3-lxml
/usr/share/licenses/python3-lxml/LICENSES.txt
/usr/share/licenses/python3-lxml/ZopePublicLicense.txt

References

Summary

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