[Solved] Python3 operate pymongo error: pymongo.errors.ConfigurationError

It is the first time to use Python 3 to connect Mongo Library in MAC.

1. Confirm whether python3 has been installed

which python3

2. Install pymongo

sudo pip3 install pymongo

3. Use Python script

python3 demo.py

Result error:

pymongo.errors.ConfigurationError: Unknown option username

I checked for a long time and didn’t find an accurate solution. Later, check the version of pymongo in the environment that can run normally before on the original window.

Resolutely upgrade pymongo to version 3.12. Problem solving.

sudo pip3 install pymongo==3.12

Similar Posts: