"brew install python" installs 3.9. Why not 3.10?

Viewed 14690

My understanding is that "brew install python" installs the latest version of python. Why isn't it pulling 3.10? 3.10 is marked as a stable release.

I can install 3.10 with "brew install python@3.10 just fine and can update my PATH so that python and pip point to the right versions. 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.

2 Answers

The "python3" formula is still 3.9 in the brew system check the doc here: https://formulae.brew.sh/formula/python@3.9#default

The latest version of the formula for 3.9 also support apple silicon.

If you want to use python3.10 you need to run as you described brew install python@3.10

The reason why 3.9 is still the official python3 formula is that generally user using the vanilla python3 are not looking for the latest revision but the more stable. in some months the transition will done.

Python@3.10 is currently keg-only, which means 3.10 is not the default version yet. You can see a message stating this by typing on the terminal: brew info python@3.10:

python@3.10 is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alternate version of another formula.

The migration tasks are not yet all done as of July 2022. You can see the latest situation and the details on GitHub: https://github.com/Homebrew/homebrew-core/pull/87075

Related