python, python3, and python@3 are all currently aliased to python@3.10. We are in the middle of a migration from 3.10 to 3.11.

Did you run brew install python@3.11? Or one of the aliases above?

🌐
Homebrew
formulae.brew.sh › formula › python@3.10
Homebrew Formulae: python@3.10
Bottle (binary package) installation support provided for: Current versions: Other versions: Revision: 1 · Depends on: Depends on when building from source: Uses from macOS: bzip2, expat (since macOS Sequoia), libffi, libxcrypt, ncurses · Binaries: 2to3-3.10, idle3.10, pydoc3.10, python3.10, python3.10-config · Analytics: Known vulnerabilities in the current version: Data from Homebrew/advisory-database. Run brew vulns python@3.10 for a live check.
Discussions

macos - "brew install python" installs 3.9. Why not 3.10? - Stack Overflow
But I am curious why "brew install python" its not installing 3.10. My other understanding is that 3.10 is directly compatible with the M1 chips so that is why I want 3.10. Please let me know if I am mistaken. ... Save this answer. ... Show activity on this post. As Henry Schreiner have specified now Python 3.10 is the new default in Brew. Thx for pointing it · --- Obsolete --- The "python3... More on stackoverflow.com
🌐 stackoverflow.com
homebrew - How to make python 3.11 my default python3 with brew - Ask Different
pointing to `python3.11`, ... been installed into /usr/local/opt/[email protected]/libexec/bin · You can add this folder to be first in your PATH and python or python3 will pick up Python 3.11 (since those are in the folder): ... Thanks, I am aware that you can update your PATH in this way, but I want to know how to use brew to set 3.11 as my default, like I can with 3.9/3.10... More on apple.stackexchange.com
🌐 apple.stackexchange.com
November 9, 2022
Force a different dependency version
brew install python@3.10 python3.10 -m pip install pipx pipx [...] More on github.com
🌐 github.com
4
1
December 7, 2022
macos monterey - Trying to run Python 3.10 from Terminal after Homebrew install - Stack Overflow
I used the Homebrew command brew install python@3.10 to install Python3.10 on my Mac. However, when I'm in Terminal and type python and then press Tab, it is only giving me the option for the Pytho... More on stackoverflow.com
🌐 stackoverflow.com
🌐
installvirtual
installvirtual.com › home › how to install python 3.10 on mac using brew
How to install python 3.10 on Mac using brew - installvirtual
October 7, 2021 - Now it’s time to install python 3.10 using brew · brew install [email protected] What if you are upgrading it from python 3.9 brew unlink [email protected] brew link --force [email protected] Now after installation let’s check the python ...
Top answer
1 of 3
40

Note: This applies to any versioned Python installation with Homebrew

After installing Python 3.11, you are given the location of the bin folder with Python 3.11:

==> Caveats
Python has been installed as
  /usr/local/bin/python3.11

Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`, `pip`, `pip3`, etc. pointing to
`python3.11`, `python3.11-config`, `pip3.11` etc., respectively, have been installed into
  /usr/local/opt/[email protected]/libexec/bin

You can add this folder to be first in your PATH and python or python3 will pick up Python 3.11 (since those are in the folder):


So: add the following line to ~/.zshrc:

export PATH="$(brew --prefix)/opt/[email protected]/libexec/bin:$PATH"

brew --prefix ensures that the correct path is used, regardless of where your brew install resides.

2 of 3
18

On macOS Ventura & Sonoma on Apple Silicon

To install homebrew's version of python3:

brew install python3

This installs brew's version of python3.x but does not override the the link to macOS's version of python3 when you use the python3 command. You can confirm which python3 is being used with the which python3 command. Now, you have two primary options here:

  1. You can unlink the system default's python3 and relink python3 to the homebrew version (see kraspa11's answer)
  2. You can simply add an alias for python3 in your ~/.zshrc file which can point to brew's version instead (I prefer this because it results in fewer edits to system defaults).

If you prefer option #2:

Open up ~/.zshrc with nano ~/.zshrc or your desired editor. BTW, if you want to see "hidden" files/folders in your /Users/[username] folder where .zshrc resides, open your user folder in finder and press ⇧ Shift + ⌘ Command + . (period). This will show/hide all hidden files and folders in your Finder.

At the end of the .zshrc file, add the following lines:

# ensure "python3" command uses homebrew's version of python3
alias python3=/opt/homebrew/bin/python3
# OPTIONAL: ensure "python" command uses homebrew's version of python3
alias python=/opt/homebrew/bin/python3

I use /opt/homebrew/bin/python3 instead of /opt/homebrew/opt/[email protected] so if/when you update your version from 3.11 to 3.12 and so on, your aliases should always work (until version 4).

Now, save and close your edited .zshrc file. To refresh your terminal to use the new alias(es), enter:

source ~/.zshrc

To ensure that your commands are pointing to the brew version of python3:

which python3 should respond: python3: aliased to /opt/homebrew/bin/python3

and

which python should respond: python: aliased to /opt/homebrew/bin/python3

NOTE: I have only tested all of the above on Apple silicon macOS Sonoma (which is in developer beta, but should be functionally the same as Ventura).

🌐
Homebrew
docs.brew.sh › Language-Runtimes-and-Packages
Homebrew Documentation: Language Runtimes and Packages
Avoid running language package managers with sudo or changing ownership of system-managed directories to make an installation succeed. Homebrew provides supported Python 3 releases and does not provide Python 2. The python and python3 aliases select Homebrew’s current default Python formula.
🌐
Code2care
code2care.org › home › python › how to install python specific version (3.8, 3.9 or 3.10) using brew
How to install Python Specific version (3.8, 3.9 or 3.10) using Brew | Code2care
January 26, 2026 - If you want to install a specific version of Python using brew you can use brew install python followed by a @ (at sign) and the version number,
Find elsewhere
🌐
YouTube
youtube.com › watch
How to install python 3.10.6 using Homebrew - YouTube
Learn how to install Python 3.10.6 on your MacOS using homebrew.3.10.6 is the latest python version released on 2nd Aug 2022.The instructions to install Pyth...
Published: August 16, 2022
Views: 10K
🌐
Homebrew
formulae.brew.sh › formula › python@3.9
Homebrew Formulae: python@3.9
Bottle (binary package) installation support provided for: Current versions: Other versions: Depends on: Depends on when building from source: Uses from macOS: bzip2, expat, libffi, libxcrypt, ncurses, unzip · Binaries: 2to3-3.9, idle3.9, pydoc3.9, python3.9, python3.9-config ·
🌐
Medium
adamraudonis.medium.com › install-python-3-10-using-pyenv-and-virtualenv-on-a-mac-683df43072d
Install Python 3.10 using pyenv and virtualenv on a Mac | by Adam Raudonis | Medium
March 4, 2023 - Press enter or click to view image in full size · First, make sure you have pyenv-virtualenv installed. You can install it using Homebrew with the following command: brew install pyenv-virtualenv ·
🌐
Yuqi Liang Dot Tech
yuqi-liang.tech › blog › setup-python-virtual-environment
Python Setup 101 - Install & Use Virtual Environments - Yuqi Liang Dot Tech
April 1, 2025 - brew install python@3.10 · Then create a virtual environment using that version: Terminal window · /opt/homebrew/opt/python@3.10/bin/python3.10 -m venv myenv · Activate the environment: Terminal window · source myenv/bin/activate · Confirm ...
🌐
AppVeyor Support
help.appveyor.com › discussions › questions › 64859-please-help-me-to-switch-to-the-python-310-under-macos-environment
Please, help me to switch to the Python 3.10 under macOS environment! / Questions / Discussion Area - AppVeyor Support
February 7, 2024 - install: - brew install python@3.10 - python3 -m venv venv - source venv/bin/activate - python3 -m pip install -r requirements.txt - python3 -m pip install -U pyinstaller - pyinstaller macos_build.spec
🌐
GitHub
gist.github.com › duonghuuphuc › 7d6fea245b60a262e96f3b2db63f5ea6
Install Python3 on macOS 10.15 and later · GitHub
This tutorial will show you how to install Python3 on a macOS system. To demonstrate the installation process, I will present the steps on macOS Catalina (Version 10.15). Instead of installing Python3 via the installer from the Python website, this tutorial will use brew which is the most popular ...
🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › starting › install3 › osx
Installing Python 3 on Mac OS X — The Hitchhiker's Guide to Python
$ brew install python · This will take a minute or two. Homebrew installs pip pointing to the Homebrew’d Python 3 for you. At this point, you have the system Python 2.7 available, potentially the Homebrew version of Python 2 installed, and ...
🌐
Homebrew
formulae.brew.sh › formula › python@3.12
Homebrew Formulae: python@3.12
Bottle (binary package) installation support provided for: Current versions: Other versions: Revision: 1 · Depends on: Depends on when building from source: Uses from macOS: bzip2, expat (since macOS Sequoia), libedit, libffi, libxcrypt, ncurses · Binaries: 2to3-3.12, idle3.12, pip3.12, pydoc3.12, python3.12, python3.12-config, wheel3.12 ·
🌐
Dataquest
dataquest.io › home › blog › tutorial: installing python on mac
Tutorial: Installing Python on Mac
March 14, 2025 - brew install python@3.10 · </li> After installation completes, verify it worked by typing: python3 --version · </li> You should see output indicating that Python 3.10.x is installed.