OS X ships with an old version of Python 2. Here's how I set up my system:
brew install pyenv pyenv-virtualenv
Then add to .zshrc
or .bashrc
:
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Then restart Terminal.app, and build the newest version of Python: