Install and Configure Python Version

Homebrew is required.

Install Python

1
brew install python

Install Python3

1
brew install python3

Install pyenv

1
brew install pyenv

Update bash/zsh profile

1
2
3
4
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile

List available python versions

1
pyenv install --list

Install python version

1
pyenv install 3.8

List installed python versions

1
pyenv versions

Set global python version

1
pyenv global 3.8