Install using homebrew
brew Install mongodb
Create folders to store data
sudo mkdir -p /data/db
Start the mongodb service
brew services start mongodb
sudo mongod
Restart and stop services
brew services stop mongodb
brew services restart mongodb
To interact with mongodb in python, you need to use the pyMongo library
install pymongo
pip3 install pymongo
uninstall
pip3 uninstall pymongo
Test if the installation is successful
python3
>>>import pymongo