mac 或linux上 pip 不支持ssl的问题
生活随笔
收集整理的這篇文章主要介紹了
mac 或linux上 pip 不支持ssl的问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
報錯:
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
本文轉自Tenderrain 51CTO博客,原文鏈接:http://blog.51cto.com/tenderrain/1956752,如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的mac 或linux上 pip 不支持ssl的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SFP模块光信号强度知识介绍
- 下一篇: 指针与储物箱的关系