当前位置:   article > 正文

ImportError: No module named cryptography.hazmat.bindings._openssl_modulenotfounderror: no module named 'cryptography

modulenotfounderror: no module named 'cryptography

問題描述:在安裝superset的時候,出現了如下bug:

(superset) [sarah@hadoop102 software]$ superset db upgrade
Traceback (most recent call last):
  File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in <module>
    from superset.cli import superset
  File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/__init__.py", line 21, in <module>
    from superset.app import create_app
  File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/app.py", line 23, in <module>
    from superset.initialization import SupersetAppInitializer
  File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 51, in <module>
    from superset.security import SupersetSecurityManager
  File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/security/__init__.py", line 17, in <module>
    from superset.security.manager import SupersetSecurityManager  # noqa: F401
  File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/security/manager.py", line 66, in <module>
    from superset.utils.core import DatasourceName, RowLevelSecurityFilterType
  File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/core.py", line 71, in <module>
    from cryptography.hazmat.backends.openssl.x509 import _Certificate
ModuleNotFoundError: No module named 'cryptography.hazmat.backends.openssl.x509
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

ImportError: No module named cryptography.hazmat.bindings._openssl

解決方案:
試了很多種方法,最後成功的是:

(superset) [sarah@hadoop102 software]$ pip uninstall pyopenssl
  • 1
(superset) [sarah@hadoop102 software]$ pip install pyopenssl==22.1.0
  • 1

在这里插入图片描述
參考網址是:https://stackoverflow.com/questions/32518458/importerror-no-module-named-cryptography-hazmat-bindings-openssl

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/582004
推荐阅读
相关标签
  

闽ICP备14008679号