macos – Switching Python version installed by Homebrew
macos – Switching Python version installed by Homebrew
There is an Homebrew known issue related to side by side install of Python 3.8 / 3.9. To workaround, following commands should work for you:
brew unlink [email protected]
brew unlink [email protected]
brew link --force [email protected]
Re-opening your terminal or execute command rehash
can be required to take account the change.
Use pyenv
. Its a software that lets you switch between any and all Python versions installed on your system. To install pyenv
, use the following code in the command-line:
curl https://pyenv.run | bash
exec $SHELL
Then find the name of the python version you want to switch to with this:
pyenv versions
And select it with this:
pyenv global <version-name>
In your case, its most likely named 3.9.0
.