1. bash_profile
vi ~/.bash_profile
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
source ~/.bash_profile
2.编辑.bashrc文件
vi ~/.bashrc
alias python2='/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7'
alias python3='/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6'
alias python=python2
source ~/.bashrc
网友评论