How To Install python2-coverage on Rocky Linux 8

In this tutorial we learn how to install python2-coverage on Rocky Linux 8. python2-coverage is Code coverage testing module for Python 2

Introduction

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

What is python2-coverage

Coverage.py is a Python 2 module that measures code coverage during Python execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed.

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

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

sudo dnf -y install python2-coverage

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

sudo yum -y install python2-coverage

How To Uninstall python2-coverage on Rocky Linux 8

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

sudo dnf remove python2-coverage

python2-coverage Package Contents on Rocky Linux 8

/usr/bin/coverage-2
/usr/bin/coverage-2.7
/usr/lib/.build-id
/usr/lib/.build-id/b4
/usr/lib/.build-id/b4/d2a98bbf28f1ab7deb5b182de51b095e2db1d3
/usr/lib64/python2.7/site-packages/coverage
/usr/lib64/python2.7/site-packages/coverage-4.5.1-py2.7.egg-info
/usr/lib64/python2.7/site-packages/coverage-4.5.1-py2.7.egg-info/PKG-INFO
/usr/lib64/python2.7/site-packages/coverage-4.5.1-py2.7.egg-info/SOURCES.txt
/usr/lib64/python2.7/site-packages/coverage-4.5.1-py2.7.egg-info/dependency_links.txt
/usr/lib64/python2.7/site-packages/coverage-4.5.1-py2.7.egg-info/entry_points.txt
/usr/lib64/python2.7/site-packages/coverage-4.5.1-py2.7.egg-info/not-zip-safe
/usr/lib64/python2.7/site-packages/coverage-4.5.1-py2.7.egg-info/top_level.txt
/usr/lib64/python2.7/site-packages/coverage/__init__.py
/usr/lib64/python2.7/site-packages/coverage/__init__.pyc
/usr/lib64/python2.7/site-packages/coverage/__init__.pyo
/usr/lib64/python2.7/site-packages/coverage/__main__.py
/usr/lib64/python2.7/site-packages/coverage/__main__.pyc
/usr/lib64/python2.7/site-packages/coverage/__main__.pyo
/usr/lib64/python2.7/site-packages/coverage/annotate.py
/usr/lib64/python2.7/site-packages/coverage/annotate.pyc
/usr/lib64/python2.7/site-packages/coverage/annotate.pyo
/usr/lib64/python2.7/site-packages/coverage/backunittest.py
/usr/lib64/python2.7/site-packages/coverage/backunittest.pyc
/usr/lib64/python2.7/site-packages/coverage/backunittest.pyo
/usr/lib64/python2.7/site-packages/coverage/backward.py
/usr/lib64/python2.7/site-packages/coverage/backward.pyc
/usr/lib64/python2.7/site-packages/coverage/backward.pyo
/usr/lib64/python2.7/site-packages/coverage/bytecode.py
/usr/lib64/python2.7/site-packages/coverage/bytecode.pyc
/usr/lib64/python2.7/site-packages/coverage/bytecode.pyo
/usr/lib64/python2.7/site-packages/coverage/cmdline.py
/usr/lib64/python2.7/site-packages/coverage/cmdline.pyc
/usr/lib64/python2.7/site-packages/coverage/cmdline.pyo
/usr/lib64/python2.7/site-packages/coverage/collector.py
/usr/lib64/python2.7/site-packages/coverage/collector.pyc
/usr/lib64/python2.7/site-packages/coverage/collector.pyo
/usr/lib64/python2.7/site-packages/coverage/config.py
/usr/lib64/python2.7/site-packages/coverage/config.pyc
/usr/lib64/python2.7/site-packages/coverage/config.pyo
/usr/lib64/python2.7/site-packages/coverage/control.py
/usr/lib64/python2.7/site-packages/coverage/control.pyc
/usr/lib64/python2.7/site-packages/coverage/control.pyo
/usr/lib64/python2.7/site-packages/coverage/data.py
/usr/lib64/python2.7/site-packages/coverage/data.pyc
/usr/lib64/python2.7/site-packages/coverage/data.pyo
/usr/lib64/python2.7/site-packages/coverage/debug.py
/usr/lib64/python2.7/site-packages/coverage/debug.pyc
/usr/lib64/python2.7/site-packages/coverage/debug.pyo
/usr/lib64/python2.7/site-packages/coverage/env.py
/usr/lib64/python2.7/site-packages/coverage/env.pyc
/usr/lib64/python2.7/site-packages/coverage/env.pyo
/usr/lib64/python2.7/site-packages/coverage/execfile.py
/usr/lib64/python2.7/site-packages/coverage/execfile.pyc
/usr/lib64/python2.7/site-packages/coverage/execfile.pyo
/usr/lib64/python2.7/site-packages/coverage/files.py
/usr/lib64/python2.7/site-packages/coverage/files.pyc
/usr/lib64/python2.7/site-packages/coverage/files.pyo
/usr/lib64/python2.7/site-packages/coverage/fullcoverage
/usr/lib64/python2.7/site-packages/coverage/fullcoverage/encodings.py
/usr/lib64/python2.7/site-packages/coverage/fullcoverage/encodings.pyc
/usr/lib64/python2.7/site-packages/coverage/fullcoverage/encodings.pyo
/usr/lib64/python2.7/site-packages/coverage/html.py
/usr/lib64/python2.7/site-packages/coverage/html.pyc
/usr/lib64/python2.7/site-packages/coverage/html.pyo
/usr/lib64/python2.7/site-packages/coverage/htmlfiles
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/coverage_html.js
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/index.html
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/jquery.ba-throttle-debounce.min.js
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/jquery.hotkeys.js
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/jquery.isonscreen.js
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/jquery.min.js
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/jquery.tablesorter.min.js
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/keybd_closed.png
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/keybd_open.png
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/pyfile.html
/usr/lib64/python2.7/site-packages/coverage/htmlfiles/style.css
/usr/lib64/python2.7/site-packages/coverage/misc.py
/usr/lib64/python2.7/site-packages/coverage/misc.pyc
/usr/lib64/python2.7/site-packages/coverage/misc.pyo
/usr/lib64/python2.7/site-packages/coverage/multiproc.py
/usr/lib64/python2.7/site-packages/coverage/multiproc.pyc
/usr/lib64/python2.7/site-packages/coverage/multiproc.pyo
/usr/lib64/python2.7/site-packages/coverage/parser.py
/usr/lib64/python2.7/site-packages/coverage/parser.pyc
/usr/lib64/python2.7/site-packages/coverage/parser.pyo
/usr/lib64/python2.7/site-packages/coverage/phystokens.py
/usr/lib64/python2.7/site-packages/coverage/phystokens.pyc
/usr/lib64/python2.7/site-packages/coverage/phystokens.pyo
/usr/lib64/python2.7/site-packages/coverage/pickle2json.py
/usr/lib64/python2.7/site-packages/coverage/pickle2json.pyc
/usr/lib64/python2.7/site-packages/coverage/pickle2json.pyo
/usr/lib64/python2.7/site-packages/coverage/plugin.py
/usr/lib64/python2.7/site-packages/coverage/plugin.pyc
/usr/lib64/python2.7/site-packages/coverage/plugin.pyo
/usr/lib64/python2.7/site-packages/coverage/plugin_support.py
/usr/lib64/python2.7/site-packages/coverage/plugin_support.pyc
/usr/lib64/python2.7/site-packages/coverage/plugin_support.pyo
/usr/lib64/python2.7/site-packages/coverage/python.py
/usr/lib64/python2.7/site-packages/coverage/python.pyc
/usr/lib64/python2.7/site-packages/coverage/python.pyo
/usr/lib64/python2.7/site-packages/coverage/pytracer.py
/usr/lib64/python2.7/site-packages/coverage/pytracer.pyc
/usr/lib64/python2.7/site-packages/coverage/pytracer.pyo
/usr/lib64/python2.7/site-packages/coverage/report.py
/usr/lib64/python2.7/site-packages/coverage/report.pyc
/usr/lib64/python2.7/site-packages/coverage/report.pyo
/usr/lib64/python2.7/site-packages/coverage/results.py
/usr/lib64/python2.7/site-packages/coverage/results.pyc
/usr/lib64/python2.7/site-packages/coverage/results.pyo
/usr/lib64/python2.7/site-packages/coverage/summary.py
/usr/lib64/python2.7/site-packages/coverage/summary.pyc
/usr/lib64/python2.7/site-packages/coverage/summary.pyo
/usr/lib64/python2.7/site-packages/coverage/templite.py
/usr/lib64/python2.7/site-packages/coverage/templite.pyc
/usr/lib64/python2.7/site-packages/coverage/templite.pyo
/usr/lib64/python2.7/site-packages/coverage/tracer.so
/usr/lib64/python2.7/site-packages/coverage/version.py
/usr/lib64/python2.7/site-packages/coverage/version.pyc
/usr/lib64/python2.7/site-packages/coverage/version.pyo
/usr/lib64/python2.7/site-packages/coverage/xmlreport.py
/usr/lib64/python2.7/site-packages/coverage/xmlreport.pyc
/usr/lib64/python2.7/site-packages/coverage/xmlreport.pyo
/usr/share/doc/python2-coverage
/usr/share/doc/python2-coverage/README.rst
/usr/share/licenses/python2-coverage
/usr/share/licenses/python2-coverage/LICENSE.txt
/usr/share/licenses/python2-coverage/NOTICE.txt

References

Summary

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