How To Install python3-matplotlib on AlmaLinux 8

In this tutorial we learn how to install python3-matplotlib in AlmaLinux 8. python3-matplotlib is Python 2D plotting library

Introduction

In this tutorial we learn how to install python3-matplotlib on AlmaLinux 8.

What is python3-matplotlib

Matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python and ipython shell, web application servers, and six graphical user interface toolkits. Matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, with just a few lines of code.

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

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

sudo dnf -y install python3-matplotlib

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

sudo yum -y install python3-matplotlib

How To Uninstall python3-matplotlib on AlmaLinux 8

To uninstall only the python3-matplotlib package we can use the following command:

sudo dnf remove python3-matplotlib

References

Summary

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