Install Python on a Mac

Install Command Line Tools

  • open a terminal session
  • enter the following command
xcode-select --install

Install Homebrew

  • navigate to
  • copy the installation script
  • open a terminal session
  • paste the installation script into your terminal session
/bin/bash -c "$(curl -fsSL"

Install Pyenv

  • open a terminal session
brew install pyenv

  • add pyenv to your .bash_profile
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.bash_profile

  • add this PATH to your zsh config
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.zshrc

  • restart your terminal session