python 环境切换

参考自:https://blog.csdn.net/Tyro_java/article/details/78510301

用的homebrew,BerkeleyCS61B课堂老师推荐https://sp19.datastructur.es/#cal

 

1.打开文件(空的就直接写)

vi ~/.bash_profile 

 

2.修改内容为

alias python2="/usr/bin/python"

alias python3="/usr/local/bin/python3"

alias python=python3

 

3.这个一定要做(生效用的)

source ~/.bash_profile

 

ps:切换回去2的话

alias python2="/usr/bin/python"

alias python3="/usr/local/bin/python3"

alias python=python2

posted on 2019-08-17 03:01  鸣动我心  阅读(1104)  评论(0编辑  收藏  举报