The "dnspython" module must be installed code example Example: ConfigurationError: The "dnspython" module must be installed to use mongodb+srv:// URIs $ python -m pip install pymongo