import _ssl # if we can‘t import it, let the error propagate ModuleNotFoundError: No mod

问题1

import _ssl # if we can’t import it, let the error propagate
ModuleNotFoundError: No module named ‘_ssl’
make: *** [Makefile:25: doc] Error 1

python -c "import ssl; print(ssl.OPENSSL_VERSION)"
pip3 install pyopenssl

问题2

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)) - skipping

pip3 install pyopenssl -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

解释如下:

pip3 install pyopenssl 是用于在 Python 3 环境中安装名为 pyopenssl 的包的命令。

-i http://pypi.douban.com/simple/ 指定了使用豆瓣镜像源来下载包。这是因为 pip 默认从官方 Python 包索引(PyPI)下载软件包,但有时由于网络原因,访问 PyPI 可能会很慢或不稳定。使用豆瓣镜像源可以提高下载速度和稳定性。

--trusted-host pypi.douban.com 指定了要信任的主机名。当使用自定义镜像源时,为了防止出现安全警告,我们需要显式地告诉 pip 我们信任此主机。在本例中,我们指定了豆瓣镜像源 pypi.douban.com 作为受信任的主机。

注意:上述命令是特定情况下的示例,您在使用时可能需要更改镜像源或信任的主机名,具体取决于您的环境和需求。

rpm -aq|grep openssl
openssl version

原因:缺少openssl-devel

yum install openssl-devel -y
rpm -aq|grep openssl
openssl-libs-1.1.1f-4.p12.ky10.aarch64
openssl-devel-1.1.1f-4.p12.ky10.aarch64
openssl-pkcs11-0.4.10-1.ky10.aarch64
openssl-1.1.1f-4.p12.ky10.aarch64

在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值