How To Install python2-setuptools on Rocky Linux 8

In this tutorial we learn how to install python2-setuptools on Rocky Linux 8. python2-setuptools is Easily build and distribute Python packages

Introduction

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

What is python2-setuptools

Setuptools is a collection of enhancements to the Python distutils that allow you to more easily build and distribute Python packages, especially ones that have dependencies on other packages. This package also contains the runtime components of setuptools, necessary to execute the software that requires pkg_resources.py.

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

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

sudo dnf -y install python2-setuptools

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

sudo yum -y install python2-setuptools

How To Uninstall python2-setuptools on Rocky Linux 8

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

sudo dnf remove python2-setuptools

python2-setuptools Package Contents on Rocky Linux 8

/usr/bin/easy_install-2
/usr/bin/easy_install-2.7
/usr/lib/python2.7/site-packages/easy_install.py
/usr/lib/python2.7/site-packages/easy_install.pyc
/usr/lib/python2.7/site-packages/easy_install.pyo
/usr/lib/python2.7/site-packages/pkg_resources
/usr/lib/python2.7/site-packages/pkg_resources/__init__.py
/usr/lib/python2.7/site-packages/pkg_resources/__init__.pyc
/usr/lib/python2.7/site-packages/pkg_resources/__init__.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/__init__.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/__init__.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/__init__.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/appdirs.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/appdirs.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/appdirs.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__about__.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__about__.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__about__.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__init__.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__init__.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__init__.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_compat.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_compat.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_compat.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_structures.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_structures.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_structures.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/markers.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/markers.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/markers.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/requirements.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/requirements.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/requirements.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/specifiers.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/specifiers.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/specifiers.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/utils.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/utils.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/utils.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/version.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/version.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/version.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/pyparsing.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/pyparsing.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/pyparsing.pyo
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/six.py
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/six.pyc
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/six.pyo
/usr/lib/python2.7/site-packages/pkg_resources/extern
/usr/lib/python2.7/site-packages/pkg_resources/extern/__init__.py
/usr/lib/python2.7/site-packages/pkg_resources/extern/__init__.pyc
/usr/lib/python2.7/site-packages/pkg_resources/extern/__init__.pyo
/usr/lib/python2.7/site-packages/pkg_resources/py31compat.py
/usr/lib/python2.7/site-packages/pkg_resources/py31compat.pyc
/usr/lib/python2.7/site-packages/pkg_resources/py31compat.pyo
/usr/lib/python2.7/site-packages/setuptools
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/INSTALLER
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/LICENSE.txt
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/METADATA
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/RECORD
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/WHEEL
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/dependency_links.txt
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/entry_points.txt
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/top_level.txt
/usr/lib/python2.7/site-packages/setuptools-39.0.1.dist-info/zip-safe
/usr/lib/python2.7/site-packages/setuptools/__init__.py
/usr/lib/python2.7/site-packages/setuptools/__init__.pyc
/usr/lib/python2.7/site-packages/setuptools/__init__.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor
/usr/lib/python2.7/site-packages/setuptools/_vendor/__init__.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/__init__.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/__init__.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/__about__.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/__about__.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/__about__.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/__init__.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/__init__.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/__init__.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/_compat.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/_compat.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/_compat.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/_structures.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/_structures.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/_structures.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/markers.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/markers.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/markers.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/requirements.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/requirements.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/requirements.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/specifiers.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/specifiers.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/specifiers.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/utils.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/utils.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/utils.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/version.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/version.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/packaging/version.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/pyparsing.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/pyparsing.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/pyparsing.pyo
/usr/lib/python2.7/site-packages/setuptools/_vendor/six.py
/usr/lib/python2.7/site-packages/setuptools/_vendor/six.pyc
/usr/lib/python2.7/site-packages/setuptools/_vendor/six.pyo
/usr/lib/python2.7/site-packages/setuptools/archive_util.py
/usr/lib/python2.7/site-packages/setuptools/archive_util.pyc
/usr/lib/python2.7/site-packages/setuptools/archive_util.pyo
/usr/lib/python2.7/site-packages/setuptools/build_meta.py
/usr/lib/python2.7/site-packages/setuptools/build_meta.pyc
/usr/lib/python2.7/site-packages/setuptools/build_meta.pyo
/usr/lib/python2.7/site-packages/setuptools/command
/usr/lib/python2.7/site-packages/setuptools/command/__init__.py
/usr/lib/python2.7/site-packages/setuptools/command/__init__.pyc
/usr/lib/python2.7/site-packages/setuptools/command/__init__.pyo
/usr/lib/python2.7/site-packages/setuptools/command/alias.py
/usr/lib/python2.7/site-packages/setuptools/command/alias.pyc
/usr/lib/python2.7/site-packages/setuptools/command/alias.pyo
/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.py
/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyc
/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyo
/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py
/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.pyc
/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.pyo
/usr/lib/python2.7/site-packages/setuptools/command/bdist_wininst.py
/usr/lib/python2.7/site-packages/setuptools/command/bdist_wininst.pyc
/usr/lib/python2.7/site-packages/setuptools/command/bdist_wininst.pyo
/usr/lib/python2.7/site-packages/setuptools/command/build_clib.py
/usr/lib/python2.7/site-packages/setuptools/command/build_clib.pyc
/usr/lib/python2.7/site-packages/setuptools/command/build_clib.pyo
/usr/lib/python2.7/site-packages/setuptools/command/build_ext.py
/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyc
/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyo
/usr/lib/python2.7/site-packages/setuptools/command/build_py.py
/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyc
/usr/lib/python2.7/site-packages/setuptools/command/build_py.pyo
/usr/lib/python2.7/site-packages/setuptools/command/develop.py
/usr/lib/python2.7/site-packages/setuptools/command/develop.pyc
/usr/lib/python2.7/site-packages/setuptools/command/develop.pyo
/usr/lib/python2.7/site-packages/setuptools/command/dist_info.py
/usr/lib/python2.7/site-packages/setuptools/command/dist_info.pyc
/usr/lib/python2.7/site-packages/setuptools/command/dist_info.pyo
/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py
/usr/lib/python2.7/site-packages/setuptools/command/easy_install.pyc
/usr/lib/python2.7/site-packages/setuptools/command/easy_install.pyo
/usr/lib/python2.7/site-packages/setuptools/command/egg_info.py
/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyc
/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyo
/usr/lib/python2.7/site-packages/setuptools/command/install.py
/usr/lib/python2.7/site-packages/setuptools/command/install.pyc
/usr/lib/python2.7/site-packages/setuptools/command/install.pyo
/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.py
/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyc
/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyo
/usr/lib/python2.7/site-packages/setuptools/command/install_lib.py
/usr/lib/python2.7/site-packages/setuptools/command/install_lib.pyc
/usr/lib/python2.7/site-packages/setuptools/command/install_lib.pyo
/usr/lib/python2.7/site-packages/setuptools/command/install_scripts.py
/usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyc
/usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyo
/usr/lib/python2.7/site-packages/setuptools/command/launcher manifest.xml
/usr/lib/python2.7/site-packages/setuptools/command/py36compat.py
/usr/lib/python2.7/site-packages/setuptools/command/py36compat.pyc
/usr/lib/python2.7/site-packages/setuptools/command/py36compat.pyo
/usr/lib/python2.7/site-packages/setuptools/command/register.py
/usr/lib/python2.7/site-packages/setuptools/command/register.pyc
/usr/lib/python2.7/site-packages/setuptools/command/register.pyo
/usr/lib/python2.7/site-packages/setuptools/command/rotate.py
/usr/lib/python2.7/site-packages/setuptools/command/rotate.pyc
/usr/lib/python2.7/site-packages/setuptools/command/rotate.pyo
/usr/lib/python2.7/site-packages/setuptools/command/saveopts.py
/usr/lib/python2.7/site-packages/setuptools/command/saveopts.pyc
/usr/lib/python2.7/site-packages/setuptools/command/saveopts.pyo
/usr/lib/python2.7/site-packages/setuptools/command/sdist.py
/usr/lib/python2.7/site-packages/setuptools/command/sdist.pyc
/usr/lib/python2.7/site-packages/setuptools/command/sdist.pyo
/usr/lib/python2.7/site-packages/setuptools/command/setopt.py
/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyc
/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyo
/usr/lib/python2.7/site-packages/setuptools/command/test.py
/usr/lib/python2.7/site-packages/setuptools/command/test.pyc
/usr/lib/python2.7/site-packages/setuptools/command/test.pyo
/usr/lib/python2.7/site-packages/setuptools/command/upload.py
/usr/lib/python2.7/site-packages/setuptools/command/upload.pyc
/usr/lib/python2.7/site-packages/setuptools/command/upload.pyo
/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.py
/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyc
/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyo
/usr/lib/python2.7/site-packages/setuptools/config.py
/usr/lib/python2.7/site-packages/setuptools/config.pyc
/usr/lib/python2.7/site-packages/setuptools/config.pyo
/usr/lib/python2.7/site-packages/setuptools/dep_util.py
/usr/lib/python2.7/site-packages/setuptools/dep_util.pyc
/usr/lib/python2.7/site-packages/setuptools/dep_util.pyo
/usr/lib/python2.7/site-packages/setuptools/depends.py
/usr/lib/python2.7/site-packages/setuptools/depends.pyc
/usr/lib/python2.7/site-packages/setuptools/depends.pyo
/usr/lib/python2.7/site-packages/setuptools/dist.py
/usr/lib/python2.7/site-packages/setuptools/dist.pyc
/usr/lib/python2.7/site-packages/setuptools/dist.pyo
/usr/lib/python2.7/site-packages/setuptools/extension.py
/usr/lib/python2.7/site-packages/setuptools/extension.pyc
/usr/lib/python2.7/site-packages/setuptools/extension.pyo
/usr/lib/python2.7/site-packages/setuptools/extern
/usr/lib/python2.7/site-packages/setuptools/extern/__init__.py
/usr/lib/python2.7/site-packages/setuptools/extern/__init__.pyc
/usr/lib/python2.7/site-packages/setuptools/extern/__init__.pyo
/usr/lib/python2.7/site-packages/setuptools/glibc.py
/usr/lib/python2.7/site-packages/setuptools/glibc.pyc
/usr/lib/python2.7/site-packages/setuptools/glibc.pyo
/usr/lib/python2.7/site-packages/setuptools/glob.py
/usr/lib/python2.7/site-packages/setuptools/glob.pyc
/usr/lib/python2.7/site-packages/setuptools/glob.pyo
/usr/lib/python2.7/site-packages/setuptools/launch.py
/usr/lib/python2.7/site-packages/setuptools/launch.pyc
/usr/lib/python2.7/site-packages/setuptools/launch.pyo
/usr/lib/python2.7/site-packages/setuptools/lib2to3_ex.py
/usr/lib/python2.7/site-packages/setuptools/lib2to3_ex.pyc
/usr/lib/python2.7/site-packages/setuptools/lib2to3_ex.pyo
/usr/lib/python2.7/site-packages/setuptools/monkey.py
/usr/lib/python2.7/site-packages/setuptools/monkey.pyc
/usr/lib/python2.7/site-packages/setuptools/monkey.pyo
/usr/lib/python2.7/site-packages/setuptools/msvc.py
/usr/lib/python2.7/site-packages/setuptools/msvc.pyc
/usr/lib/python2.7/site-packages/setuptools/msvc.pyo
/usr/lib/python2.7/site-packages/setuptools/namespaces.py
/usr/lib/python2.7/site-packages/setuptools/namespaces.pyc
/usr/lib/python2.7/site-packages/setuptools/namespaces.pyo
/usr/lib/python2.7/site-packages/setuptools/package_index.py
/usr/lib/python2.7/site-packages/setuptools/package_index.pyc
/usr/lib/python2.7/site-packages/setuptools/package_index.pyo
/usr/lib/python2.7/site-packages/setuptools/pep425tags.py
/usr/lib/python2.7/site-packages/setuptools/pep425tags.pyc
/usr/lib/python2.7/site-packages/setuptools/pep425tags.pyo
/usr/lib/python2.7/site-packages/setuptools/py27compat.py
/usr/lib/python2.7/site-packages/setuptools/py27compat.pyc
/usr/lib/python2.7/site-packages/setuptools/py27compat.pyo
/usr/lib/python2.7/site-packages/setuptools/py31compat.py
/usr/lib/python2.7/site-packages/setuptools/py31compat.pyc
/usr/lib/python2.7/site-packages/setuptools/py31compat.pyo
/usr/lib/python2.7/site-packages/setuptools/py33compat.py
/usr/lib/python2.7/site-packages/setuptools/py33compat.pyc
/usr/lib/python2.7/site-packages/setuptools/py33compat.pyo
/usr/lib/python2.7/site-packages/setuptools/py36compat.py
/usr/lib/python2.7/site-packages/setuptools/py36compat.pyc
/usr/lib/python2.7/site-packages/setuptools/py36compat.pyo
/usr/lib/python2.7/site-packages/setuptools/sandbox.py
/usr/lib/python2.7/site-packages/setuptools/sandbox.pyc
/usr/lib/python2.7/site-packages/setuptools/sandbox.pyo
/usr/lib/python2.7/site-packages/setuptools/script (dev).tmpl
/usr/lib/python2.7/site-packages/setuptools/script.tmpl
/usr/lib/python2.7/site-packages/setuptools/site-patch.py
/usr/lib/python2.7/site-packages/setuptools/site-patch.pyc
/usr/lib/python2.7/site-packages/setuptools/site-patch.pyo
/usr/lib/python2.7/site-packages/setuptools/ssl_support.py
/usr/lib/python2.7/site-packages/setuptools/ssl_support.pyc
/usr/lib/python2.7/site-packages/setuptools/ssl_support.pyo
/usr/lib/python2.7/site-packages/setuptools/unicode_utils.py
/usr/lib/python2.7/site-packages/setuptools/unicode_utils.pyc
/usr/lib/python2.7/site-packages/setuptools/unicode_utils.pyo
/usr/lib/python2.7/site-packages/setuptools/version.py
/usr/lib/python2.7/site-packages/setuptools/version.pyc
/usr/lib/python2.7/site-packages/setuptools/version.pyo
/usr/lib/python2.7/site-packages/setuptools/wheel.py
/usr/lib/python2.7/site-packages/setuptools/wheel.pyc
/usr/lib/python2.7/site-packages/setuptools/wheel.pyo
/usr/lib/python2.7/site-packages/setuptools/windows_support.py
/usr/lib/python2.7/site-packages/setuptools/windows_support.pyc
/usr/lib/python2.7/site-packages/setuptools/windows_support.pyo
/usr/share/doc/python2-setuptools
/usr/share/doc/python2-setuptools/CHANGES.rst
/usr/share/doc/python2-setuptools/README.rst
/usr/share/doc/python2-setuptools/developer-guide.txt
/usr/share/doc/python2-setuptools/development.txt
/usr/share/doc/python2-setuptools/easy_install.txt
/usr/share/doc/python2-setuptools/formats.txt
/usr/share/doc/python2-setuptools/history.txt
/usr/share/doc/python2-setuptools/index.txt
/usr/share/doc/python2-setuptools/pkg_resources.txt
/usr/share/doc/python2-setuptools/python3.txt
/usr/share/doc/python2-setuptools/releases.txt
/usr/share/doc/python2-setuptools/requirements.txt
/usr/share/doc/python2-setuptools/roadmap.txt
/usr/share/doc/python2-setuptools/setuptools.txt
/usr/share/licenses/python2-setuptools
/usr/share/licenses/python2-setuptools/LICENSE

References

Summary

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