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:
- Python compiles and installs under Linux and reports an error: makefile: 1141: install
- [Solved] TypeError: ‘Collection’ object is not callable. If you meant to call the ‘authenticate’ method on a ‘Database’ object it is failing because no such method exists.
- Ubuntu Error: No module named ‘apt_pkg’ (Step-by-Step Tutorial)
- How to Solve pip3 ImportError: cannot import name ‘main’
- Solution to fatal error in launcher: unable to create process using ‘”‘In PIP installation
- [Solved] ImportError: No module named ‘_tkinter’, please install the python3-tk package
- How to Solve ModuleNotFoundError: No module named ‘pip._internal’
- Python.exe Error: No module named pip.__main__; ‘pip’ is a package and cannot be directly executed
- [Solved] Python-pip Upgrade ERROR: AttributeError: ‘NoneType’ object has no attribute ‘bytes’
- The process of installing jupyter notebook on MAC