How To Install python2-backports on Rocky Linux 8
Introduction
In this tutorial we learn how to install python2-backports
on Rocky Linux 8.
What is python2-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 python2-backports
on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python2-backports.
Install python2-backports on Rocky Linux 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install python2-backports
using dnf
by running the following command:
sudo dnf -y install python2-backports
Install python2-backports on Rocky Linux 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install python2-backports
using yum
by running the following command:
sudo yum -y install python2-backports
How To Uninstall python2-backports on Rocky Linux 8
To uninstall only the python2-backports
package we can use the following command:
sudo dnf remove python2-backports
python2-backports Package Contents on Rocky Linux 8
/usr/lib/python2.7/site-packages/backports
/usr/lib/python2.7/site-packages/backports/__init__.py
/usr/lib/python2.7/site-packages/backports/__init__.pyc
/usr/lib/python2.7/site-packages/backports/__init__.pyo
/usr/lib64/python2.7/site-packages/backports
/usr/lib64/python2.7/site-packages/backports/__init__.py
/usr/lib64/python2.7/site-packages/backports/__init__.pyc
/usr/lib64/python2.7/site-packages/backports/__init__.pyo
References
Summary
In this tutorial we learn how to install python2-backports
on Rocky Linux 8 using yum and dnf.