学习自https://www.jianshu.com/p/4fd565e3cd31
1、下载最新版
- 官网下载python3.8 并且安装
下载链接
2、打开终端执行指令
open ~/.bash_profile
3、确认.bash_profile文件里是否存在以下内容,没有则添加并保存
注意我的缺少的是 alias python 这一句,需要double check
# Setting PATH for Python 3.8
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH
alias python="/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8"
4、终端执行指令
source ~/.bash_profile
5、确认升级,终端输入指令
xxMacBook-Pro:~ xx$ python
Python 3.8.0 (v3.8.0:xxxxxx, Oct 14 2019, 10:23:27)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> xx-Pro:~ xx$ python
网友评论