Install Python 3 Via Homebrew

First, you need to install Homebrew by following

Homebrew

Next, you can either install or upgrade python 3 depending on whether you have installed before

# If you haven't installed python before,
brew install python3
brew link python3

# If you simply want to upgrade
brew upgrade python3

# Check whether Python using homebrew install correctly
which python3  # it should output /usr/local/bin/python3

# Check Python versions
python3 --version