How To Install python2-ipaddress on AlmaLinux 8

In this tutorial we learn how to install python2-ipaddress in AlmaLinux 8. python2-ipaddress is Port of the python 3.3+ ipaddress module to 2.6+

Introduction

In this tutorial we learn how to install python2-ipaddress on AlmaLinux 8.

What is python2-ipaddress

ipaddress provides the capabilities to create, manipulate and operate on IPv4 and IPv6 addresses and networks. The functions and classes in this module make it straightforward to handle various tasks related to IP addresses, including checking whether or not two hosts are on the same subnet, iterating over all hosts in a particular subnet, checking whether or not a string represents a valid IP address or network definition, and so on.

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

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

sudo dnf -y install python2-ipaddress

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

sudo yum -y install python2-ipaddress

How To Uninstall python2-ipaddress on AlmaLinux 8

To uninstall only the python2-ipaddress package we can use the following command:

sudo dnf remove python2-ipaddress

References

Summary

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