pip默认安装的是支持2.x版本,所以要将python重装,并将pip修改为pip支持3的执行文件,(这个可以搜索网上解决方案)
pip3安装好后,还有一个SSL问题,不支持SSL库,MAC中没法重新编译,只能修改默认安装源配置,位置在
~/.pip/pip.conf 注意如果该目录下没有该文件可以创建一个该文件。内容如下:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
#index-url = http://mirrors.aliyun.com/pypi/simple/
#http://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
#trusted-host=pypi.tuna.tsinghua.edu.cn
注意最好用阿里源,测试清华源不可以