How To Install python3-rpm on Fedora 36

In this tutorial we learn how to install python3-rpm in Fedora 36. python3-rpm is Python 3 bindings for apps which will manipulate RPM packages

Introduction

In this tutorial we learn how to install python3-rpm on Fedora 36.

What is python3-rpm

The python3-rpm package contains a module that permits applications written in the Python programming language to use the interface supplied by RPM Package Manager libraries. This package should be installed if you want to develop Python 3 programs that will manipulate RPM packages and databases.

We can use yum or dnf to install python3-rpm on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install python3-rpm.

Install python3-rpm on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install python3-rpm

Install python3-rpm on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install python3-rpm

How To Uninstall python3-rpm on Fedora 36

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

sudo dnf remove python3-rpm

python3-rpm Package Contents on Fedora 36

/usr/lib/.build-id
/usr/lib/.build-id/51
/usr/lib/.build-id/51/b39932085c14f797155458cc09214bc2cbe77c
/usr/lib/.build-id/ef
/usr/lib/.build-id/ef/fa24405d83526d361c06d11ce14112bb26e548
/usr/lib64/python3.10/site-packages/rpm
/usr/lib64/python3.10/site-packages/rpm-4.17.0-py3.10.egg-info
/usr/lib64/python3.10/site-packages/rpm/__init__.py
/usr/lib64/python3.10/site-packages/rpm/__pycache__
/usr/lib64/python3.10/site-packages/rpm/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/rpm/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/rpm/__pycache__/transaction.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/rpm/__pycache__/transaction.cpython-310.pyc
/usr/lib64/python3.10/site-packages/rpm/_rpm.cpython-310-x86_64-linux-gnu.so
/usr/lib64/python3.10/site-packages/rpm/_rpm.so
/usr/lib64/python3.10/site-packages/rpm/transaction.py

References

Summary

In this tutorial we learn how to install python3-rpm on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).