mac python2.7/3.5同时存在 终端默认选中pyth

2017-08-06  本文已影响38人  樱落e_e

mac下同时存在Python2.7和Python3.5  打开终端默认选择Python3.5 步骤

1、终端打开.bash_profile文件

open ~/.bash_profile

2、更改.bash_profile文件

增加一行:alias python="/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5"

注:特别注意双引号问题   效果图如下

3、重新编译.bash_profile文件

source .bash_profile

4、再次查看Python版本

python

上一篇 下一篇

猜你喜欢

热点阅读