0

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

Mark Rotteveel
  • 90,369
  • 161
  • 124
  • 175
  • Possible duplicate: https://stackoverflow.com/questions/51342408/how-do-i-install-python-packages-in-googles-colab – ForceBru Aug 11 '21 at 10:38

0 Answers0