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

猜你喜欢

转载自www.cnblogs.com/defoliate/p/11367194.html
今日推荐