How To Install python3-hamcrest on Rocky Linux 8

In this tutorial we learn how to install python3-hamcrest on Rocky Linux 8. python3-hamcrest is Hamcrest matchers for Python

Introduction

In this tutorial we learn how to install python3-hamcrest on Rocky Linux 8.

What is python3-hamcrest

PyHamcrest is a framework for writing matcher objects, allowing you to declaratively define “match” rules. There are a number of situations where matchers are invaluable, such as UI validation, or data filtering, but it is in the area of writing flexible tests that matchers are most commonly used. Python 3 version.

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

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

sudo dnf -y install python3-hamcrest

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

sudo yum -y install python3-hamcrest

How To Uninstall python3-hamcrest on Rocky Linux 8

To uninstall only the python3-hamcrest package we can use the following command:

sudo dnf remove python3-hamcrest

python3-hamcrest Package Contents on Rocky Linux 8

/usr/lib/python3.6/site-packages/PyHamcrest-1.9.0-py3.6.egg-info
/usr/lib/python3.6/site-packages/PyHamcrest-1.9.0-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/PyHamcrest-1.9.0-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/PyHamcrest-1.9.0-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/PyHamcrest-1.9.0-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/PyHamcrest-1.9.0-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/hamcrest
/usr/lib/python3.6/site-packages/hamcrest/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core
/usr/lib/python3.6/site-packages/hamcrest/core/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/assert_that.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/assert_that.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/base_description.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/base_description.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/base_matcher.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/base_matcher.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/compat.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/compat.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/description.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/description.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/matcher.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/matcher.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/selfdescribing.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/selfdescribing.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/selfdescribingvalue.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/selfdescribingvalue.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/string_description.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/__pycache__/string_description.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/assert_that.py
/usr/lib/python3.6/site-packages/hamcrest/core/base_description.py
/usr/lib/python3.6/site-packages/hamcrest/core/base_matcher.py
/usr/lib/python3.6/site-packages/hamcrest/core/compat.py
/usr/lib/python3.6/site-packages/hamcrest/core/core
/usr/lib/python3.6/site-packages/hamcrest/core/core/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/allof.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/allof.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/anyof.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/anyof.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/described_as.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/described_as.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/is_.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/is_.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isanything.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isanything.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isequal.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isequal.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isinstanceof.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isinstanceof.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isnone.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isnone.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isnot.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/isnot.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/issame.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/issame.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/raises.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/__pycache__/raises.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/core/allof.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/anyof.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/described_as.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/is_.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/isanything.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/isequal.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/isinstanceof.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/isnone.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/isnot.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/issame.py
/usr/lib/python3.6/site-packages/hamcrest/core/core/raises.py
/usr/lib/python3.6/site-packages/hamcrest/core/description.py
/usr/lib/python3.6/site-packages/hamcrest/core/helpers
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__pycache__/hasmethod.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__pycache__/hasmethod.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__pycache__/wrap_matcher.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/__pycache__/wrap_matcher.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/hasmethod.py
/usr/lib/python3.6/site-packages/hamcrest/core/helpers/wrap_matcher.py
/usr/lib/python3.6/site-packages/hamcrest/core/matcher.py
/usr/lib/python3.6/site-packages/hamcrest/core/selfdescribing.py
/usr/lib/python3.6/site-packages/hamcrest/core/selfdescribingvalue.py
/usr/lib/python3.6/site-packages/hamcrest/core/string_description.py
/usr/lib/python3.6/site-packages/hamcrest/library
/usr/lib/python3.6/site-packages/hamcrest/library/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/library/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/library/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/bool
/usr/lib/python3.6/site-packages/hamcrest/library/bool/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/library/bool/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/library/bool/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/bool/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/bool/__pycache__/bool_comparison.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/bool/__pycache__/bool_comparison.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/bool/bool_comparison.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/is_empty.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/is_empty.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containing.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containing.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containingentries.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containingentries.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containingkey.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containingkey.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containingvalue.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isdict_containingvalue.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isin.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/isin.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_containing.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_containing.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_containinginanyorder.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_containinginanyorder.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_containinginorder.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_containinginorder.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_onlycontaining.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/__pycache__/issequence_onlycontaining.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/collection/is_empty.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/isdict_containing.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/isdict_containingentries.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/isdict_containingkey.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/isdict_containingvalue.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/isin.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/issequence_containing.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/issequence_containinginanyorder.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/issequence_containinginorder.py
/usr/lib/python3.6/site-packages/hamcrest/library/collection/issequence_onlycontaining.py
/usr/lib/python3.6/site-packages/hamcrest/library/integration
/usr/lib/python3.6/site-packages/hamcrest/library/integration/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/library/integration/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/library/integration/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/integration/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/integration/__pycache__/match_equality.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/integration/__pycache__/match_equality.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/integration/match_equality.py
/usr/lib/python3.6/site-packages/hamcrest/library/number
/usr/lib/python3.6/site-packages/hamcrest/library/number/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/library/number/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/library/number/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/number/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/number/__pycache__/iscloseto.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/number/__pycache__/iscloseto.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/number/__pycache__/ordering_comparison.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/number/__pycache__/ordering_comparison.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/number/iscloseto.py
/usr/lib/python3.6/site-packages/hamcrest/library/number/ordering_comparison.py
/usr/lib/python3.6/site-packages/hamcrest/library/object
/usr/lib/python3.6/site-packages/hamcrest/library/object/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/haslength.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/haslength.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/hasproperty.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/hasproperty.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/hasstring.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/__pycache__/hasstring.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/object/haslength.py
/usr/lib/python3.6/site-packages/hamcrest/library/object/hasproperty.py
/usr/lib/python3.6/site-packages/hamcrest/library/object/hasstring.py
/usr/lib/python3.6/site-packages/hamcrest/library/text
/usr/lib/python3.6/site-packages/hamcrest/library/text/__init__.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/isequal_ignoring_case.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/isequal_ignoring_case.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/isequal_ignoring_whitespace.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/isequal_ignoring_whitespace.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringcontains.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringcontains.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringcontainsinorder.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringcontainsinorder.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringendswith.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringendswith.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringmatches.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringmatches.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringstartswith.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/stringstartswith.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/substringmatcher.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/__pycache__/substringmatcher.cpython-36.pyc
/usr/lib/python3.6/site-packages/hamcrest/library/text/isequal_ignoring_case.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/isequal_ignoring_whitespace.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/stringcontains.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/stringcontainsinorder.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/stringendswith.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/stringmatches.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/stringstartswith.py
/usr/lib/python3.6/site-packages/hamcrest/library/text/substringmatcher.py

References

Summary

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