下载python3.6.6
https://www.python.org/ftp/python/3.6.6/python-3.6.6-macosx10.9.pkg
#. open. ~/.bash_profile
添加如下配置pip 和python3 :
alias python="/usr/local/bin/python3" alias pip="/usr/local/bin/pip3"
激活:source ~./bash_profile
command +s 保存退出 配置国内源: mkdir -p ~/.pip touch ~/.pip/pip.conf vim ~/.pip/pip.conf
输入如下:
[global] trusted-host = mirrors.aliyun.com index-url = https://mirrors.aliyun.com/pypi/simple
esc 推出编辑模式
:wq 保存退出