I'm trying to upgrade from "Python 3.7.3" to "Python 3.8" with $ brew upgrade python. But when I try, brew returns:
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 2 formulae.
Error: python not installed
I know python is installed because I've been using it for months. I can confirm this by running, which python3
/usr/bin/python3
And python3 --version,
Python 3.7.3
I don't know what is causing this?
Could the issue be that python --version still points to python2, Python 2.7.16.
UPDATE
I also confirm I've run brew cleanup and brew doctor.
brew info python returns
[email protected]: stable 3.8.5 (bottled)
Interpreted, interactive, object-oriented programming language
https://www.python.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/[email protected]
License: Python-2.0
==> Dependencies
Build: pkg-config ✔
Required: gdbm ✔, [email protected] ✔, readline ✔, sqlite ✔, xz ✔
==> Caveats
Python has been installed as
/usr/local/bin/python3
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/[email protected]/libexec/bin
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.8/site-packages
See: https://docs.brew.sh/Homebrew-and-Python
==> Analytics
install: 587,815 (30 days), 1,615,984 (90 days), 2,710,078 (365 days)
install-on-request: 187,760 (30 days), 307,168 (90 days), 343,355 (365 days)
build-error: 0 (30 days)
python not installedmeans Python wasn't installed by homebrew.brew info pythonhave to say?brew info pythonreturns above. TBH, it's beyond my comprehension.Not installedline. Please install it before trying to upgrade it.