Keeping Python up to date ensures you have the latest features, bug fixes, and security patches. This guide covers the safest and most effective methods for updating Python on macOS. 1. Check Your Current Python Version Before updating, open Terminal (Applications > Utilities > Terminal) and run:
which -a python3 If you work on different projects, use pyenv to switch between Python versions without conflicts.
python3 --version You should see the new version number (e.g., Python 3.12.2 ). update python mac
brew install python@3.12 Homebrew installs Python to /opt/homebrew/bin/python3 (Apple Silicon) or /usr/local/bin/python3 (Intel). After installing, check the version again:
python3 --version or
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install it with:
To see Python installations on your system: