brew command for updating python version on macos code example
Example 1: brew install python 3.7
brew install python@3.7
Example 2: how to set default python version in macos
ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python
brew install python@3.7
ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python