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’” 如何解决?的详细内容,更多请关注【创想鸟】其它相关文章!

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

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2182014.html

(0)
上一篇 2025年2月25日 15:09:31
下一篇 2025年2月18日 03:29:49

AD推荐 黄金广告位招租... 更多推荐

相关推荐

发表回复

登录后才能评论