brew install python@3.12
Open the app and run the command found on brew.sh .
macOS includes an outdated version of Python 2 (and in some recent versions, a specific build of Python 3) for system maintenance. Do not attempt to force-update or delete this system version , as it may break macOS functionality. update python mac
The installer does not remove older system Pythons (macOS relies on an old Python 2.7 for internal use). It simply adds the new version alongside them.
Note: You must manually download new installers for major version updates. brew install python@3
which -a python3
. This is the preferred method for many because it simplifies future updates and dependency management. Pyenv (Best for Version Control): For power users who need to switch between multiple versions of Python (e.g., 3.10 for one project and 3.12 for another), Pyenv is the gold standard. It allows you to install and set "local" or "global" versions without affecting the system Python. 3. Post-Update Housekeeping Once the new version is installed, ensure your tools are also up to date: Update Pip: Your package installer needs to be current to fetch the latest libraries. Run The installer does not remove older system Pythons
This installs the latest version of Python 3 and pip .