Before you proceed to install the PyMongo driver, you might need to deal with driver compatibility issues. These issues are twofold, and are detailed as follows:
- Driver version support for the version of MongoDB you are using
- Driver version support for the version of Python you are using
There is an excellent documentation reference that cross-references the version of PyMongo against the version of MongoDB. The table can be found here: https://docs.mongodb.com/ecosystem/drivers/pymongo/#mongodb-compatibility. In the table, for example, you will notice that MongoDB version 2.6 is supported by PyMongo driver versions 2.7 all the way up to 3.9. However, do you really want to be using MongoDB version 2? Probably not!
More relevant to this book is the support for MongoDB 4.x. As of the time of writing, the PyMongo driver version 3.9 supports both MongoDB 4.0 and 4.2. On the other hand, if you find that you need a slightly older version of the PyMongo driver,...