Homebrew only installs the binary python3, just to be safe. Xcode is complaining about a lack of the binary python (note the lack of a 3!).
You have a couple of options:
-
When installing
python3, Homebrew also creates alibexecfolder with unversioned symlinks, such aspython(what you’re missing). Note the Caveats printed when installing it:$ brew info python python@3.9: stable 3.9.10 (bottled) ==> Caveats Python has been installed as /opt/homebrew/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /opt/homebrew/opt/python@3.9/libexec/bin See: https://docs.brew.sh/Homebrew-and-PythonYou could add this directory to your
$PATH, such thatpythonandpipbecome available; something like the following might suffice:echo 'export PATH="'"$(brew --prefix)"'/opt/python@3.9/libexec/bin:$PATH"' \ >>~/.bash_profile… although that will need to be modified according to your precise version of Python3, your shell of choice, etc.
-
Alternatively and more simply, although a little more jankily, you could simply manually create the appropriate symlinks:
ln -s "$(brew --prefix)/bin/python"{3,}