首页 > 系统服务 > 详细

mac 或linux上 pip 不支持ssl的问题

时间:2017-08-16 15:06:17      阅读:586      评论:0      收藏:0      [点我收藏+]

报错:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.


新版的pip 默认要求使用https源了,

pip 的源可以使用国内的源,下载速度会很快。

参考这个 http://mirrors.aliyun.com/help/pypi

pip.conf中要有trusted-host,就可以不用https了。同时也可以解决你的问题。


在~/.pip/pip.conf文件中添加或修改

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/  #可以手工指定是http的或者https的 

[install]
trusted-host=mirrors.aliyun.com

如果是连接pypi.python.org的话配置如下

[global]
index-url = http://pypi.python.org/simple/
[install]
trusted-host=pypi.python.org


阿里云的速度要远远高于python官方的速度


另外可以安装一下pyopenssl试试

pip install pyopenssl


另一篇文章

mac上安装python3 和 sqlite的问题

mac 或linux上 pip 不支持ssl的问题

原文:http://tenderrain.blog.51cto.com/9202912/1956752

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!