Python 安装后使用 google-api-python-client 出现“AttributeError: module ‘lib’ has no attribute ‘X509_V_FLAG_CB_ISSUER_CHECK’” 如何解决?

python 安装后使用 google-api-python-client 出现“attributeerror: module 'lib' has no attribute 'x509_v_flag_cb_issuer_check'” 如何解决?

错误:模块“lib”没有属性“x509_v_flag_cb_issuer_check”

问题:

在重新安装 python 后,使用 google-api-python-client 库时出现以下错误:

attributeerror: module 'lib' has no attribute 'x509_v_flag_cb_issuer_check'

解决方法:

立即学习“Python免费学习笔记(深入)”;

该错误通常由 pyopenssl 库版本过旧引起。要解决此问题,请执行以下步骤:

编辑 opensslcrypto.py 文件。注释掉有问题的行:

# cb_issuer_check = _lib.x509_v_flag_cb_issuer_check

使用以下命令更新 pyopenssl:

pip install pip --upgradepip install pyopenssl --upgrade

重新添加注释的行:

CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK

现在,应该可以正常工作了。

以上就是Python 安装后使用 google-api-python-client 出现“AttributeError: module ‘lib’ has no attribute ‘X509_V_FLAG_CB_ISSUER_CHECK’” 如何解决?的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1352766.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2025年12月13日 17:06:56
下一篇 2025年12月13日 17:07:10

相关推荐

发表回复

登录后才能评论
关注微信