- 安装: https://www.python.org/downloads/
- 打开终端,输入which python3,查看路径
- 打开配置文件
vim ~/.bash_profile
- 重命名Python
alias python="/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
- 保存文件
- 终端执行命令:
source ~/.bash_profile
- 查看python版本
python -V
vim ~/.bash_profile
alias python="/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
source ~/.bash_profile
python -V