1、升级python本身

brew update
brew upgrade python


2、修改默认解释器

vim ~/.bash_profile
export PATH="/usr/local/opt/python@3.13/libexec/bin:$PATH"
source ~/.bash_profile

3、验证一下

python --version