How To Install python2-debug on AlmaLinux 8

In this tutorial we learn how to install python2-debug in AlmaLinux 8. python2-debug is Debug version of the Python 2 runtime

Introduction

In this tutorial we learn how to install python2-debug on AlmaLinux 8.

What is python2-debug

python2-debug provides a version of the Python 2 runtime with numerous debugging features enabled, aimed at advanced Python users, such as developers of Python extension modules. This version uses more memory and will be slower than the regular Python 2 build, but is useful for tracking down reference-counting issues, and other bugs. The bytecodes are unchanged, so that .pyc files are compatible between the two version of Python 2, but the debugging features mean that C/C++ extension modules are ABI-incompatible with those built for the standard runtime. It shares installation directories with the standard Python 2 runtime, so that .py and .pyc files can be shared. All compiled extension modules gain a “_d” suffix (“foo_d.so” rather than “foo.so”) so that each Python 2 implementation can load its own extensions.

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

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

sudo dnf -y install python2-debug

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

sudo yum -y install python2-debug

How To Uninstall python2-debug on AlmaLinux 8

To uninstall only the python2-debug package we can use the following command:

sudo dnf remove python2-debug

References

Summary

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