How to Setup Python in MacOS

python
macos
envirnoment
2020
Author

Aster Hu

Published

June 13, 2020

2023 UPDATE

I wrote an update version of this article, about setting up python on the new ARM-based Mac for macOS Monterey 12.3 and later.

Check Current Version of Python

Let’s check the current version first:

python --version
#check python2 version

python3 --version
#check python3 version

Update Python3

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

python3 --version

Now it should be up-to-date.