Let’s check the current version first:
python --version #check python2 version python3 --version #check python3 version
If you don’t have Python installed yet, you can simply downloaded the package from official website. For me, since I already installed Python, I just upgrade it by Homebrew, which is a great package manager on MacOS.
brew update brew upgrade python3
Then check the version again
Now it should be up-to-date.