How To Install python3-packaging on Rocky Linux 8

In this tutorial we learn how to install python3-packaging on Rocky Linux 8. python3-packaging is Core utilities for Python packages

Introduction

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

What is python3-packaging

python3-packaging provides core utilities for Python packages like utilities for dealing with versions, specifiers, markers etc.

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

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

sudo dnf -y install python3-packaging

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

sudo yum -y install python3-packaging

How To Uninstall python3-packaging on Rocky Linux 8

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

sudo dnf remove python3-packaging

python3-packaging Package Contents on Rocky Linux 8

/usr/lib/python3.6/site-packages/packaging
/usr/lib/python3.6/site-packages/packaging-16.8.dist-info
/usr/lib/python3.6/site-packages/packaging-16.8.dist-info/INSTALLER
/usr/lib/python3.6/site-packages/packaging-16.8.dist-info/METADATA
/usr/lib/python3.6/site-packages/packaging-16.8.dist-info/RECORD
/usr/lib/python3.6/site-packages/packaging-16.8.dist-info/WHEEL
/usr/lib/python3.6/site-packages/packaging-16.8.dist-info/top_level.txt
/usr/lib/python3.6/site-packages/packaging/__about__.py
/usr/lib/python3.6/site-packages/packaging/__init__.py
/usr/lib/python3.6/site-packages/packaging/__pycache__
/usr/lib/python3.6/site-packages/packaging/__pycache__/__about__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/__about__.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/_compat.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/_compat.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/_structures.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/_structures.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/markers.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/markers.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/requirements.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/requirements.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/specifiers.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/specifiers.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/utils.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/utils.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/version.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/packaging/__pycache__/version.cpython-36.pyc
/usr/lib/python3.6/site-packages/packaging/_compat.py
/usr/lib/python3.6/site-packages/packaging/_structures.py
/usr/lib/python3.6/site-packages/packaging/markers.py
/usr/lib/python3.6/site-packages/packaging/requirements.py
/usr/lib/python3.6/site-packages/packaging/specifiers.py
/usr/lib/python3.6/site-packages/packaging/utils.py
/usr/lib/python3.6/site-packages/packaging/version.py
/usr/share/doc/python3-packaging
/usr/share/doc/python3-packaging/CHANGELOG.rst
/usr/share/doc/python3-packaging/CONTRIBUTING.rst
/usr/share/doc/python3-packaging/README.rst
/usr/share/licenses/python3-packaging
/usr/share/licenses/python3-packaging/LICENSE
/usr/share/licenses/python3-packaging/LICENSE.APACHE
/usr/share/licenses/python3-packaging/LICENSE.BSD

References

Summary

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