How To Install python3-pyudev on AlmaLinux 8

In this tutorial we learn how to install python3-pyudev in AlmaLinux 8. python3-pyudev is A libudev binding

Introduction

In this tutorial we learn how to install python3-pyudev on AlmaLinux 8.

What is python3-pyudev

pyudev is a LGPL licensed, pure Python binding for libudev, the device and hardware management and information library for Linux. It supports almost all libudev functionality, you can enumerate devices, query device properties and attributes or monitor devices, including asynchronous monitoring with threads, or within the event loops of Qt, Glib or wxPython. The binding supports CPython 2 (2.6 or newer) and 3 (3.1 or newer), and PyPy 1.5 or newer. It is tested against udev 151 or newer, earlier versions of udev as found on dated Linux systems may work, but are not officially supported.

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

Install python3-pyudev on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install python3-pyudev

Install python3-pyudev on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install python3-pyudev

How To Uninstall python3-pyudev on AlmaLinux 8

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

sudo dnf remove python3-pyudev

References

Summary

In this tutorial we learn how to install python3-pyudev on AlmaLinux 8 using yum and dnf.