Upgrade Python Mac Jun 2026

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc echo 'eval "$(pyenv init -)"' >> ~/.zshrc source ~/.zshrc

macOS comes with a pre-installed version of Python (usually an older version like Python 2.7 or an outdated Python 3 in recent macOS versions). upgrade python mac

Use a Package Manager .