xxxxxxxxxx
type -a python
# Result:
# python is /usr/bin/python
# python is /usr/local/bin/python
xxxxxxxxxx
brew install python
echo "alias python=/opt/homebrew/bin/python3" >> ~/.zshrc
after above command try
python --version
Or try Try 'python3 --version' instead of 'python'.