xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "export PATH=/usr/local/bin:$PATH" >> ~/.bash_profile
官方Python 3安装会在用户目录~/.bash_profile
添加:
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
pip3 install --upgrade pip
$ pip --version
pip 18.1 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
$ python3 --version
Python 3.7.0
$ which python3
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3