0

I have been trying to follow the basic Pymongo example: https://www.mongodb.com/blog/post/getting-started-with-python-and-mongodb for connecting to a MongoDB atlas cluster.

from pymongo import MongoClient
from pprint import pprint

client = MongoClient("'<<MongoDB URL>>’")
db = client.admin

serverstatus = db.command("serverStatus")
pprint(serverstatus)

Yet, with Conda and Windows 10, I continue to get the error:

File "C:\Users\name\miniconda3\lib\site-packages\pymongo\ssl_support.py", line 184, in get_ssl_context
raise ConfigurationError("The ssl module is not available.")
pymongo.errors.ConfigurationError: The ssl module is not available.

I have tried reinstalling conda yet it doesn't fix the issue, Which package could be lacking?

YuTing
  • 6,555
  • 2
  • 6
  • 16
abraguez
  • 345
  • 3
  • 11
  • Does `pip install pymongo[tls]` from "[Using PyMongo with MongoDB Atlas](https://pymongo.readthedocs.io/en/stable/atlas.html)" help? – bartolo-otrit Nov 12 '21 at 13:13
  • @bartolo-otrit No, before this warning, one requiring to install pymongo[tls] appears, which I have done, then the above warning appears when trying to run the code. – abraguez Nov 12 '21 at 21:37
  • Does `pip install pyOpenSSL` from [No module named 'OpenSSL'](https://stackoverflow.com/questions/42637878/modulenotfounderror-no-module-named-openssl) help? – bartolo-otrit Nov 13 '21 at 07:22

0 Answers0