Update Python easy update to Python 3.9 with homebrew – To update Mac os python from an older version to the latest python example python 3.9.1 you can do the folowing :
This article briefly describes how to replace its version of python on Mac. I wrote a similar article some time ago.

Introduction – update to Python 3.9.1 – HOMEBREW
I used Homebrew to get the latest python as describe on https://formulae.brew.sh/formula/python@3.9:
brew install python@3.9
python --version Python 3.8.5 python3 --version Python 3.8.5
You see that it stays on the older version.
Detect where python or python3 is setup
I had to first verify where my python command is pointing, by launching :
which python
It gave me in my case:
/Users/myuser/.pyenv/shims/python
You need also to verify where is python3 command if you have different versions :
which python3
I get :
/Users/myuser/.pyenv/shims/python3
Replace the version
I need to replace the version of the both command python and python3 by launching :
ln -s -f /usr/local/bin/python3.9 /Users/myuser/.pyenv/shims/python3
And also launch :
ln -s -f /usr/local/bin/python3.9 /Users/myuser/.pyenv/shims/python
The you can test it works :
python --version Python 3.9.1 python3 --version Python 3.9.1
Mac os update Python – Internal links :
This article briefly describes how to replace its version of python on Mac. I wrote a similar article some time ago.