Mac下升级Python至新版本
1.下载python最新版本
链接:https://www.python.org/downloads/mac-osx/
安装默认位置为: /Library/Frameworks/Python.framework/Versions/3.8/

2.打开终端,修改~/.bash_profile文件
代码如下:# SettingPATHforPython3.8# Theoriginalversionissavedin.bash_profile.pysavePATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"exportPATH
aliaspython="/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8"
3.重启终端或执行
source ~/.bash_profile

发表评论 (审核通过后显示评论):