How To Install python-cairocffi on CentOS 7

In this tutorial we learn how to install python-cairocffi on CentOS 7. python-cairocffi is cffi-based cairo bindings for Python

Introduction

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

What is python-cairocffi

cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of Python bindings and object-oriented API for cairo. Cairo is a 2D vector graphics library with support for multiple backends including image buffers, PNG, PostScript, PDF, and SVG file output.

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

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

sudo yum -y install python-cairocffi

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

sudo dnf -y install python-cairocffi

How To Uninstall python-cairocffi on CentOS 7

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

sudo dnf remove python-cairocffi

References

Summary

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