There are a number of ways in which you can install the PyMongo driver package, detailed as follows:
- Compiling the source code
- Installing a pre-built binary
- Using pip3
This section describes how to use pip3 to install the PyMongo driver package as well as where PyMongo files are stored in the filesystem. For more information on the latest PyMongo driver, you can consult the Python Package Index (PyPI) (see https://pypi.org/). Enter pymongo in the search dialog box, and a list of pertinent results is displayed. Clicking on the https://pypi.org/project/pymongo/ link, you will see the current version of PyMongo.
To use pip3 to install the PyMongo driver, open a Terminal window, and run the following command. Please note that you will most likely need either root or administrator privileges to perform this command:
pip3 install pymongo
Here is the output from an Ubuntu Linux 20.04 server:
We have now successfully installed PyMongo using...