Install it with:
echo 'eval "$(pyenv init -)"' >> ~/.zshrc source ~/.zshrc
Choose the method that fits your workflow, and you’ll always have a modern, secure Python on your Mac. update python mac
brew install python@3.12 Homebrew installs Python to /opt/homebrew/bin/python3 (Apple Silicon) or /usr/local/bin/python3 (Intel). After installing, check the version again:
To see Python installations on your system: Install it with: echo 'eval "$(pyenv init -)"' >> ~/
which -a python3 If you work on different projects, use pyenv to switch between Python versions without conflicts.
via Homebrew:
python3 --version You should see the new version number (e.g., Python 3.12.2 ).