1.安装python3
2.打开终端:
输入命令打开./bash_profile文件:
open ~/.bash_profile
打开文件添加python路径,别名与自己安装的python版本对应,
alias python="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"
修改.bash_profile文件如下:

输入命令重新读取./bash_profile文件:
source .bash_profile
查看python版本
python --version
至此mac系统的版本修改完成,以下是终端命令:

网友评论