🔗链接:https://www.python.org/downloads/mac-osx/
注:下载后的安装包为pkg文件,直接一步一步安装即可。
安装默认位置为: /Library/Frameworks/Python.framework/Versions/3.7/
2.打开终端,修改~/.bash_profile文件
1
2
3
4
5
6
7
|
代码如下:
# Setting PATH for Python 3.7
# The original version is saved in . bash_profile . pysave
PATH = "/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
alias python = "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"
|
3.重启终端或执行
4. 查看python版本
zuiwdeMac-mini:Python zuiw$ python -V
Python 3.7.3