Error: No similarly named formulae found. Error: No available formula or cask with the name "python"

Viewed 15487

So, I'm using macOS Big Sur. So I typed:

python --version

Python 2.7.16

brew install python

I got this error message when I want to update my python via my terminal.

Error: No similarly named formulae found.
Error: No available formula or cask with the name "python".
It was migrated from homebrew/cask to homebrew/core.

I would like to update it to Python 3, so when I run my commands on VSC. I can just type python instead of python3. What does this error message mean?

2 Answers

Run this command in terminal:

rm -fr $(brew --repo homebrew/core)

Then try:

 brew install python3

it will install python 3.9.

this has worked for me. use the exact version as such python@3.9

First search available packages using

brew search python

Then install the version you want ex:

brew install python@3.9
Related