How To Install python-ipaddress.noarch on Amazon Linux 2

In this tutorial we learn how to install python-ipaddress.noarch in Amazon Linux 2. python-ipaddress.noarch is Port of the python 3.3+ ipaddress module to 2.6+

Introduction

In this tutorial we learn how to install python-ipaddress.noarch on Amazon Linux 2.

What is python-ipaddress.noarch

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 to install python-ipaddress.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install python-ipaddress.noarch.

Install python-ipaddress.noarch on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python-ipaddress.noarch using yum by running the following command:

sudo yum -y install python-ipaddress.noarch

How To Uninstall python-ipaddress.noarch on Amazon Linux 2

To uninstall only the python-ipaddress.noarch package we can use the following command:

sudo yum remove python-ipaddress.noarch

python-ipaddress.noarch Package Contents on Amazon Linux 2

/usr/lib/python2.7/site-packages/ipaddress-1.0.16-py2.7.egg-info
/usr/lib/python2.7/site-packages/ipaddress.py
/usr/lib/python2.7/site-packages/ipaddress.pyc
/usr/lib/python2.7/site-packages/ipaddress.pyo
/usr/share/doc/python-ipaddress-1.0.16
/usr/share/doc/python-ipaddress-1.0.16/README.md

References

Summary

In this tutorial we learn how to install python-ipaddress.noarch on Amazon Linux 2 using yum.