using python on a mac code example Example 1: which python mac $ brew update && brew upgrade python Example 2: install python 3 on mac $ brew install python3