In this example we will show how to test if the “Pymongo” installation was successful or if “Pymongo” is already installed in Python.
Source Code
import pymongo
# Save this file as the demo_pymongodb_test.py file and execute it.
# If it was executed with no errors, "PyMongo" is installed.