I am trying to connect MongoDB from Atlas.
My mongo uri is: mongodb+srv://abc:123@something.something.com/admin?retryWrites=True
My pymongo version is 3.6.1
I have installed dnspython and done import dns
But i still get this error:

dnspython module must be installed to use mongodb+srv:// URI
I got stuck with the same problem and tried
pip install dnspython==2.0.0
This is the latest version from https://pypi.org/project/dnspython/
It worked :D
pymongo - "dnspython" module must be installed to use mongodb+srv:// URIs