How To Install python-backports on CentOS 7
Introduction
In this tutorial we learn how to install python-backports
on CentOS 7.
What is python-backports
The backports namespace is a namespace reserved for features backported from the Python standard library to older versions of Python 2. Packages that exist in the backports namespace in Fedora should not provide their own backports/init.py, but instead require this package. Backports to earlier versions of Python 3, if they exist, do not need this package because of changes made in Python 3.3 in PEP 420 (http
We can use yum
or dnf
to install python-backports
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install python-backports.
Install python-backports 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-backports
using yum
by running the following command:
sudo yum -y install python-backports
Install python-backports 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-backports
using dnf
by running the following command:
sudo dnf -y install python-backports
How To Uninstall python-backports on CentOS 7
To uninstall only the python-backports
package we can use the following command:
sudo dnf remove python-backports
References
Summary
In this tutorial we learn how to install python-backports
on CentOS 7 using yum
and dnf
.