问题:通过brew或者从python下载安装完成后,修改.bash_profile无法成功
答:修改.zprofile
# Setting PATH for Python 3.9
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
export PATH
export PATH="/usr/local/opt/python@3.9/bin:$PATH"
alias python="/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9"
alias pip="/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3.9"
并执行
source .zprofile
就可以生效了
网友评论