MacOS安装python3.7.4

MacOS默认已自带python,查询版本

python -V

默认自带是python 2.7.4

python官网下载3.7.4安装
https://www.python.org/

安装完后查询python版本,还是2.7.4

需要将3.7.4设置为默认

vi  ~/.bash_profile

或者

open ~/.bash_profile

最后一行添加(路径是默认安装路径)

alias python="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"

以下命令重启终端,设置生效

source ~/.bash_profile

再次查询版本

python -V

标签: none

添加新评论

18luck 365bet 888zhenren aomenduchang aomenjinshayule baijiale bbin beplay bet007 betvictor betway bifa bst hg0088 bwin fenghuangyule jinbobao lebaijia long8 manbet quanxunwang shenbotaiyangcheng tengbohui ule vwin w88 wellbet WilliamHill yulepingtai laohuji