mac 或linux上 pip 不支持ssl的问题
生活随笔
收集整理的這篇文章主要介紹了
mac 或linux上 pip 不支持ssl的问题
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
報(bào)錯(cuò):
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
新版的pip 默認(rèn)要求使用https源了,
pip 的源可以使用國(guó)內(nèi)的源,下載速度會(huì)很快。
參考這個(gè)?http://mirrors.aliyun.com/help/pypi
pip.conf中要有trusted-host,就可以不用https了。同時(shí)也可以解決你的問(wèn)題。
在~/.pip/pip.conf文件中添加或修改
[global] index-url?=?http://mirrors.aliyun.com/pypi/simple/??#可以手工指定是http的或者h(yuǎn)ttps的?[install] trusted-host=mirrors.aliyun.com如果是連接pypi.python.org的話配置如下
[global] index-url?=?http://pypi.python.org/simple/ [install] trusted-host=pypi.python.org阿里云的速度要遠(yuǎn)遠(yuǎn)高于python官方的速度
另外可以安裝一下pyopenssl試試
pip?install?pyopenssl
本文轉(zhuǎn)自Tenderrain 51CTO博客,原文鏈接:http://blog.51cto.com/tenderrain/1956752,如需轉(zhuǎn)載請(qǐng)自行聯(lián)系原作者
總結(jié)
以上是生活随笔為你收集整理的mac 或linux上 pip 不支持ssl的问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: SFP模块光信号强度知识介绍
- 下一篇: linux命令:until循环