Greetings you will see I have these lines of code to connect to my mongo dB database
import pymongo
client =
pymongo.MongoClient("the url is here to connect with mongo db")
db = client.tester
The problem is that I get this warning when I try to test the connection
/usr/local/lib/python3.7/dist-packages/pymongo/uri_parser.py in parse_uri(uri, default_port, validate, warn, normalize, connect_timeout)
426 elif uri.startswith(SRV_SCHEME):
427 if not _HAVE_DNSPYTHON:
--> 428 raise ConfigurationError('The "dnspython" module must be '
429 'installed to use mongodb+srv:// URIs')
430 is_srv = True
configuration error: The "dnspython" module must be installed to use mongodb+srv:// URIs
My question is how do I do what I ask you to do, how do I install "dnspython" or how do I import it to my google collab ? Feel free to write to me in English or Spanish. But if I need help. Thanks