How To Install python2-pybind11 on Rocky Linux 8

In this tutorial we learn how to install python2-pybind11 on Rocky Linux 8. python2-pybind11 is Development headers for pybind11

Introduction

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

What is python2-pybind11

pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. This package contains the Python 2 files.

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

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

sudo dnf -y install python2-pybind11

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

sudo yum -y install python2-pybind11

How To Uninstall python2-pybind11 on Rocky Linux 8

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

sudo dnf remove python2-pybind11

python2-pybind11 Package Contents on Rocky Linux 8

/usr/lib64/python2.7/site-packages/pybind11
/usr/lib64/python2.7/site-packages/pybind11-2.4.3-py2.7.egg-info
/usr/lib64/python2.7/site-packages/pybind11-2.4.3-py2.7.egg-info/PKG-INFO
/usr/lib64/python2.7/site-packages/pybind11-2.4.3-py2.7.egg-info/SOURCES.txt
/usr/lib64/python2.7/site-packages/pybind11-2.4.3-py2.7.egg-info/dependency_links.txt
/usr/lib64/python2.7/site-packages/pybind11-2.4.3-py2.7.egg-info/top_level.txt
/usr/lib64/python2.7/site-packages/pybind11/__init__.py
/usr/lib64/python2.7/site-packages/pybind11/__init__.pyc
/usr/lib64/python2.7/site-packages/pybind11/__init__.pyo
/usr/lib64/python2.7/site-packages/pybind11/__main__.py
/usr/lib64/python2.7/site-packages/pybind11/__main__.pyc
/usr/lib64/python2.7/site-packages/pybind11/__main__.pyo
/usr/lib64/python2.7/site-packages/pybind11/_version.py
/usr/lib64/python2.7/site-packages/pybind11/_version.pyc
/usr/lib64/python2.7/site-packages/pybind11/_version.pyo

References

Summary

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