Managing Python Versions on macOS with pyenv
macOS ships with Python, but using the system Python for your projects is asking for trouble. pyenv solves this elegantly: install as many versions as you want and choose which one to use per project, without conflicts. Installation brew install pyenv Then add the following to your shell config (~/.zshrc or ~/.bashrc): export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" Reload your shell: source ~/.zshrc Installing Python versions List available versions: ...