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,如需转载请自行联系原作者




相关文章
|
1月前
|
Linux 应用服务中间件 网络安全
linux ssl 证书 --本地制作数字证书并进行程序的数字签名
linux ssl 证书 --本地制作数字证书并进行程序的数字签名
21 0
|
2月前
|
存储 缓存 Linux
如何在Linux环境下对pip的缓存地址进行修改
如何在Linux环境下对pip的缓存地址进行修改
107 0
|
15天前
|
安全 应用服务中间件 网络安全
linux_nginx中添加ssl配置(open ssl)
linux_nginx中添加ssl配置(open ssl)
25 1
|
29天前
|
Linux Windows
Windows、Mac、Linux解决端口被占用的问题
Windows、Mac、Linux解决端口被占用的问题
28 1
|
2月前
|
Linux
linux查看固有MAC地址的三种方法
linux查看固有MAC地址的三种方法
75 0
|
2月前
|
iOS开发 MacOS Python
Mac安装pip报错的解决办法
Mac安装pip报错的解决办法
|
3月前
|
NoSQL 关系型数据库 MySQL
Windows、Linux、Mac安装数据库(mysql、MongoDB、Redis)#0
不同系统下进行MySQL安装、MongoDB安装、Redis安装【2月更文挑战第5天】
447 5
Windows、Linux、Mac安装数据库(mysql、MongoDB、Redis)#0
|
3月前
|
存储 Linux 网络安全
如何在 Linux 中删除 SSL 证书和 SSH 密码?
如何在 Linux 中删除 SSL 证书和 SSH 密码?
93 1
如何在 Linux 中删除 SSL 证书和 SSH 密码?
|
3月前
|
Linux Shell
mac/linux提示bash: telnet: command not found
mac/linux提示bash: telnet: command not found