将其设置为默认python,可选
cmd命令打开vi ~/.bash_profile进行修改
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
# PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
PATH="/usr/local/bin:${PATH}"
export PATH
PATH=”/usr/local/Cellar/python/3.6.4_4/bin:${PATH}”
export PATH
alias python="/usr/local/Cellar/python/3.6.4_4/bin/python3.6"
cmd命令:
source ~/.bash_profile
添加zsh配置文件:
HenrydeMacBook% vim ~/.zshrc
HenrydeMacBook% cat ~/.zshrc
source ~/.bash_profile
温馨提示:答案为网友推荐,仅供参考