Mac將Python版本升級到3.7版本
1、Python3.7下載地址:https://www.python.org/downloads/mac-osx/
2、打開bash_profile文件查看3.7的路徑,打開指令:vim ~/.bash_profile
3、重命名Python
alias python ="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"
4、重命名之後,使文件生效的方法
1)關閉終端,重起終端,然後執行:python --version 來查看Python3.7是否生效;
2)使用指令:source ~/.bash_profile 使文件生效,再查看Python3.7是否生效。
如下圖所示: