How To Install python3-mongomock on Rocky Linux 8

In this tutorial we learn how to install python3-mongomock on Rocky Linux 8. python3-mongomock is Module for testing MongoDB-dependent code

Introduction

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

What is python3-mongomock

Mongomock is a small library to help testing Python code that interacts with MongoDB via Pymongo.

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

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

sudo dnf -y install python3-mongomock

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

sudo yum -y install python3-mongomock

How To Uninstall python3-mongomock on Rocky Linux 8

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

sudo dnf remove python3-mongomock

python3-mongomock Package Contents on Rocky Linux 8

/usr/lib/python3.6/site-packages/mongomock
/usr/lib/python3.6/site-packages/mongomock-3.20.0-py3.6.egg-info
/usr/lib/python3.6/site-packages/mongomock-3.20.0-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/mongomock-3.20.0-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/mongomock-3.20.0-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/mongomock-3.20.0-py3.6.egg-info/not-zip-safe
/usr/lib/python3.6/site-packages/mongomock-3.20.0-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/mongomock-3.20.0-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/mongomock/__init__.py
/usr/lib/python3.6/site-packages/mongomock/__pycache__
/usr/lib/python3.6/site-packages/mongomock/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/__version__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/__version__.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/aggregate.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/aggregate.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/collection.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/collection.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/command_cursor.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/command_cursor.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/database.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/database.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/filtering.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/filtering.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/gridfs.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/gridfs.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/helpers.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/helpers.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/mongo_client.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/mongo_client.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/object_id.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/object_id.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/patch.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/patch.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/read_concern.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/read_concern.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/read_preferences.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/read_preferences.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/results.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/results.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/store.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/store.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/write_concern.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/mongomock/__pycache__/write_concern.cpython-36.pyc
/usr/lib/python3.6/site-packages/mongomock/__version__.py
/usr/lib/python3.6/site-packages/mongomock/aggregate.py
/usr/lib/python3.6/site-packages/mongomock/collection.py
/usr/lib/python3.6/site-packages/mongomock/command_cursor.py
/usr/lib/python3.6/site-packages/mongomock/database.py
/usr/lib/python3.6/site-packages/mongomock/filtering.py
/usr/lib/python3.6/site-packages/mongomock/gridfs.py
/usr/lib/python3.6/site-packages/mongomock/helpers.py
/usr/lib/python3.6/site-packages/mongomock/mongo_client.py
/usr/lib/python3.6/site-packages/mongomock/object_id.py
/usr/lib/python3.6/site-packages/mongomock/patch.py
/usr/lib/python3.6/site-packages/mongomock/read_concern.py
/usr/lib/python3.6/site-packages/mongomock/read_preferences.py
/usr/lib/python3.6/site-packages/mongomock/results.py
/usr/lib/python3.6/site-packages/mongomock/store.py
/usr/lib/python3.6/site-packages/mongomock/write_concern.py
/usr/share/doc/python3-mongomock
/usr/share/doc/python3-mongomock/README.rst
/usr/share/licenses/python3-mongomock
/usr/share/licenses/python3-mongomock/LICENSE

References

Summary

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