I'm having an error with pymongo (version 3.6.0) when I try to instantiate a MongoClient. My python version is 3.7.4, running on OS X Mojave.
Does any one know how this problem can be fixed or if there is any workaround?
$ pip3 freeze | grep pymongo
WARNING: Could not generate requirement for distribution -ppnope 0.1.0 (/usr/local/lib/python3.7/site-packages): Parse error at "'-ppnope='": Expected W:(abcd...)
pymongo==3.6.0---------------------------------------------------------------------------
LookupError Traceback (most recent call last)
<ipython-input-69-60edd7a153e2> in <module>
----> 1 import pymongo 2 3 client = pymongo.MongoClient("mongodb://XXXXXX:27017") 4
/usr/local/lib/python3.7/site-packages/pymongo/__init__.py in <module> 79 MAX_SUPPORTED_WIRE_VERSION) 80 from pymongo.cursor import CursorType
---> 81 from pymongo.mongo_client import MongoClient 82 from pymongo.mongo_replica_set_client import MongoReplicaSetClient 83 from pymongo.operations import (IndexModel,
/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py in <module> 51 uri_parser, 52 client_session)
---> 53 from pymongo.client_options import ClientOptions 54 from pymongo.command_cursor import CommandCursor 55 from pymongo.cursor_manager import CursorManager
/usr/local/lib/python3.7/site-packages/pymongo/client_options.py in <module> 21 from pymongo.errors import ConfigurationError 22 from pymongo.monitoring import _EventListeners
---> 23 from pymongo.pool import PoolOptions 24 from pymongo.read_concern import ReadConcern 25 from pymongo.read_preferences import (make_read_preference,
/usr/local/lib/python3.7/site-packages/pymongo/pool.py in <module> 245 # to import the IDNA codec. Import it here, where presumably we're on the 246 # main thread, to avoid the deadlock. See PYTHON-607.
--> 247 u'foo'.encode('idna') 248 249
LookupError: unknown encoding: idna Reset to default