How To Install python3-evdev on AlmaLinux 8

In this tutorial we learn how to install python3-evdev in AlmaLinux 8. python3-evdev is Python bindings for the Linux input handling subsystem

Introduction

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

What is python3-evdev

This package provides python bindings to the generic input event interface in Linux. The evdev interface serves the purpose of passing events generated in the kernel directly to userspace through character devices that are typically located in /dev/input/. This package also comes with bindings to uinput, the userspace input subsystem. Uinput allows userspace programs to create and handle input devices that can inject events directly into the input subsystem. In other words, python-evdev allows you to read and write input events on Linux. An event can be a key or button press, a mouse movement or a tap on a touchscreen.

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

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

sudo dnf -y install python3-evdev

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

sudo yum -y install python3-evdev

How To Uninstall python3-evdev on AlmaLinux 8

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

sudo dnf remove python3-evdev

References

Summary

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