python使用requests请求https报错ssl error 使用pip安装包时也会报ssl error

python使用requests请求https报错ssl error 使用pip安装包时也会报ssl error,第1张

情况描述:

1、pip install ***时报错提示:

pip 【WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, st】

2、python3使用requests请求https接口时会提示

Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available)

解决方案:重装python

1、wget https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tgz

2、tar -zxvf https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tgz

3、cd Python-3.7.8

4、vim Modules/Setup 找到这几行给注释打开

5、make && make install

验证一下 /usr/local/bin/pip3 install requests发现报错没了。


使用requests时报错也没了!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/568848.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-09
下一篇 2022-04-09

发表评论

登录后才能评论

评论列表(0条)

保存