Homebrew is a package manager for Mac OSX that allows easy management of Python and many other development tools. You must have Xcode installed before you install Homebrew. Then follow the instructions on the Homebrew homepage to install Homebrew.
$ brew update
$ brew install python
Or
brew install python3
for Python 3
$ brew linkapps
It seems that
brew linkapps
is no longer supported.