1、先找到你的Python3 安装的位置
which python3

2. 进入当前用户的home目录:
cd ~/
3. 创建.bash_profile文件:
touch .bash_profile
4、修改系统配置文件~/.bash_profile ,执行:
open ~/.bash_profile
最后一行添加:
alias python="/usr/local/bin/python3.7"
5.command+s保存关闭文件
6.使修改后的配置生效命令:
source .bash_profile
7.验证环境变量是否配置成功:
