1. 查看Mac的python版本为python2
python --version
2. 在命令行查看python3的位置
3. 新建/修改.bash_profile
vi .bash_profile
or vim $HOME/.bash_profile
4. 编辑.bash_profile
用alias给python命令 起个别名,定位到python3
5. 使.bash_profile生效
source ./bash_profile
6. 查看Mac的python版本已变成python3
python --version