How To Install python2-certifi on CentOS 7

In this tutorial we learn how to install python2-certifi on CentOS 7. python2-certifi is Python package for providing Mozilla’s CA Bundle

Introduction

In this tutorial we learn how to install python2-certifi on CentOS 7.

What is python2-certifi

Certifi is a carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. It has been extracted from the Requests project. Please note that this Fedora package does not actually include a certificate collection at all. It reads the system shared certificate trust collection instead. For more details on this system, see the ca-certificates package. This package provides the Python 2 certifi library.

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

Install python2-certifi on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install python2-certifi

Install python2-certifi on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install python2-certifi

How To Uninstall python2-certifi on CentOS 7

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

sudo dnf remove python2-certifi

References

Summary

In this tutorial we learn how to install python2-certifi on CentOS 7 using yum and dnf.