How To Install python-mako on CentOS 7

In this tutorial we learn how to install python-mako on CentOS 7. python-mako is Mako template library for Python

Introduction

In this tutorial we learn how to install python-mako on CentOS 7.

What is python-mako

Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako’s syntax and API borrows from the best ideas of many others, including Django templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server Page) language, which refines the familiar ideas of componentized layout and inheritance to produce one of the most straightforward and flexible models available, while also maintaining close ties to Python calling and scoping semantics.

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

Install python-mako on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install python-mako

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

sudo dnf -y install python-mako

How To Uninstall python-mako on CentOS 7

To uninstall only the python-mako package we can use the following command:

sudo dnf remove python-mako

References

Summary

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