mac升级pip报错There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

起因:安装fasttext(sudo pip install fasttext)

报错:There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] 

解释:证书有问题 

解决:sudo curl https://bootstrap.pypa.io/get-pip.py | python

问题来了--- 更新不了 [SSL: TLSV1_ALERT_PROTOCOL_VERSION] 这个错误依然存在,因为更新不了,还会告诉你,现在是9.0.1版本 需要更新到18.0版本,而且会告诉你

          Could not install packages due to an EnvironmentError: [Errno 13] Permission denied

          Consider using the `--user` option or check the permissions.

如何解决:

首先执行 sudo curl https://bootstrap.pypa.io/get-pip.py >> get-pip.py

然后执行 sudo python get-pip.py

总结:会出现各种权限的问题 sudo可以直接获得root权限,无意间尝试发现这样可以,呵呵了~~

你可能感兴趣的:(mac升级pip报错There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION])