How To Install python2-devel on Rocky Linux 8

In this tutorial we learn how to install python2-devel on Rocky Linux 8. python2-devel is Libraries and header files needed for Python 2 development

Introduction

In this tutorial we learn how to install python2-devel on Rocky Linux 8.

What is python2-devel

This package contains libraries and header files used to build applications with and native libraries for Python 2

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

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

sudo dnf -y install python2-devel

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

sudo yum -y install python2-devel

How To Uninstall python2-devel on Rocky Linux 8

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

sudo dnf remove python2-devel

python2-devel Package Contents on Rocky Linux 8

/usr/bin/python2-config
/usr/bin/python2.7-config
/usr/include/python2.7/Python-ast.h
/usr/include/python2.7/Python.h
/usr/include/python2.7/abstract.h
/usr/include/python2.7/asdl.h
/usr/include/python2.7/ast.h
/usr/include/python2.7/bitset.h
/usr/include/python2.7/boolobject.h
/usr/include/python2.7/bufferobject.h
/usr/include/python2.7/bytearrayobject.h
/usr/include/python2.7/bytes_methods.h
/usr/include/python2.7/bytesobject.h
/usr/include/python2.7/cStringIO.h
/usr/include/python2.7/cellobject.h
/usr/include/python2.7/ceval.h
/usr/include/python2.7/classobject.h
/usr/include/python2.7/cobject.h
/usr/include/python2.7/code.h
/usr/include/python2.7/codecs.h
/usr/include/python2.7/compile.h
/usr/include/python2.7/complexobject.h
/usr/include/python2.7/datetime.h
/usr/include/python2.7/descrobject.h
/usr/include/python2.7/dictobject.h
/usr/include/python2.7/dtoa.h
/usr/include/python2.7/enumobject.h
/usr/include/python2.7/errcode.h
/usr/include/python2.7/eval.h
/usr/include/python2.7/fileobject.h
/usr/include/python2.7/floatobject.h
/usr/include/python2.7/frameobject.h
/usr/include/python2.7/funcobject.h
/usr/include/python2.7/genobject.h
/usr/include/python2.7/graminit.h
/usr/include/python2.7/grammar.h
/usr/include/python2.7/import.h
/usr/include/python2.7/intobject.h
/usr/include/python2.7/intrcheck.h
/usr/include/python2.7/iterobject.h
/usr/include/python2.7/listobject.h
/usr/include/python2.7/longintrepr.h
/usr/include/python2.7/longobject.h
/usr/include/python2.7/marshal.h
/usr/include/python2.7/memoryobject.h
/usr/include/python2.7/metagrammar.h
/usr/include/python2.7/methodobject.h
/usr/include/python2.7/modsupport.h
/usr/include/python2.7/moduleobject.h
/usr/include/python2.7/node.h
/usr/include/python2.7/object.h
/usr/include/python2.7/objimpl.h
/usr/include/python2.7/opcode.h
/usr/include/python2.7/osdefs.h
/usr/include/python2.7/parsetok.h
/usr/include/python2.7/patchlevel.h
/usr/include/python2.7/pgen.h
/usr/include/python2.7/pgenheaders.h
/usr/include/python2.7/py_curses.h
/usr/include/python2.7/pyarena.h
/usr/include/python2.7/pycapsule.h
/usr/include/python2.7/pyconfig.h
/usr/include/python2.7/pyctype.h
/usr/include/python2.7/pydebug.h
/usr/include/python2.7/pyerrors.h
/usr/include/python2.7/pyexpat.h
/usr/include/python2.7/pyfpe.h
/usr/include/python2.7/pygetopt.h
/usr/include/python2.7/pymacconfig.h
/usr/include/python2.7/pymactoolbox.h
/usr/include/python2.7/pymath.h
/usr/include/python2.7/pymem.h
/usr/include/python2.7/pyport.h
/usr/include/python2.7/pystate.h
/usr/include/python2.7/pystrcmp.h
/usr/include/python2.7/pystrtod.h
/usr/include/python2.7/pythonrun.h
/usr/include/python2.7/pythread.h
/usr/include/python2.7/rangeobject.h
/usr/include/python2.7/setobject.h
/usr/include/python2.7/sliceobject.h
/usr/include/python2.7/stringobject.h
/usr/include/python2.7/structmember.h
/usr/include/python2.7/structseq.h
/usr/include/python2.7/symtable.h
/usr/include/python2.7/sysmodule.h
/usr/include/python2.7/timefuncs.h
/usr/include/python2.7/token.h
/usr/include/python2.7/traceback.h
/usr/include/python2.7/tupleobject.h
/usr/include/python2.7/ucnhash.h
/usr/include/python2.7/unicodeobject.h
/usr/include/python2.7/warnings.h
/usr/include/python2.7/weakrefobject.h
/usr/lib64/libpython2.7.so
/usr/lib64/pkgconfig/python-2.7.pc
/usr/lib64/pkgconfig/python.pc
/usr/lib64/pkgconfig/python2.pc
/usr/lib64/python2.7/config/Setup
/usr/lib64/python2.7/config/Setup.config
/usr/lib64/python2.7/config/Setup.local
/usr/lib64/python2.7/config/config.c
/usr/lib64/python2.7/config/config.c.in
/usr/lib64/python2.7/config/install-sh
/usr/lib64/python2.7/config/libpython2.7.so
/usr/lib64/python2.7/config/makesetup
/usr/lib64/python2.7/config/python.o
/usr/share/doc/python2-devel
/usr/share/doc/python2-devel/README.valgrind
/usr/share/doc/python2-devel/gdbinit
/usr/share/doc/python2-devel/valgrind-python.supp

References

Summary

In this tutorial we learn how to install python2-devel on Rocky Linux 8 using yum and dnf.