How to default Python3.8 on my Mac using Homebrew?
Feb 28
I have updated my python 3 to the latest version 3.8:
brew search python
==> Formulae
app-engine-python gst-python python ✔ python@3.8 ✔
boost-python ipython python-markdown wxpython
boost-python3 micropython python-yq
==> Casks
awips-python kk7ds-python-runtime mysql-connector-python
But when I check the python3 version on my mac it still shows 3.7:
python3 --version
Python 3.7.6
how can I default python3 to the latest 3.8 version using Homebrew ?
Edit:
When I tried to use brew switch, it tells me I only installed python 3.7.6, but with last brew upgrade I'm pretty sure that python3.8.1 is installed with Homebrew
brew switch python 3.8.1
python does not have a version "3.8.1" in the Cellar.
python's installed versions: 3.7.6_1
1 answer
Accepted answer · original discussion
May 14
Here is the solution:
If existing symlinks belong to python 3.7 you should unlink them:
brew unlink python
Basically all you need to do:
brew link --force python@3.8
OR force the link and overwrite all conflicting files:
brew link --force --overwrite python@3.8
OR if needed list all files that would be deleted:
brew link --overwrite --dry-run python@3.8
Thus you can switch to any python version available in the Homebrew repo.
Also check out this answer for pyenv usage
Your perspective belongs here.
Sign in with a verified account to contribute.
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.