Score:2

ModuleNotFoundError: No module named 'cryptography.hazmat.backends.openssl.x509' in ubuntu 22.04

nf flag

During the installation of the Apache superset with the direction from the below link

https://asd.learnlearn.in/apache-superset-ubuntu-22/

We are getting the error shown below:

(venv) skt@admin:~$ superset fab create-admin
Traceback (most recent call last):
  File "/home/st/venv/bin/superset", line 33, in <module>
    sys.exit(load_entry_point('apache-superset==1.5.1', 'console_scripts', 'superset')())
  File "/home/st/venv/bin/superset", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/st/venv/lib/python3.8/site-packages/superset/__init__.py", line 21, in <module>
    from superset.app import create_app
  File "/home/st/venv/lib/python3.8/site-packages/superset/app.py", line 23, in <module>
    from superset.initialization import SupersetAppInitializer
  File "/home/st/venv/lib/python3.8/site-packages/superset/initialization/__init__.py", line 51, in <module>
    from superset.security import SupersetSecurityManager
  File "/home/st/venv/lib/python3.8/site-packages/superset/security/__init__.py", line 17, in <module>
    from superset.security.manager import SupersetSecurityManager  # noqa: F401
  File "/home/st/venv/lib/python3.8/site-packages/superset/security/manager.py", line 76, in <module>
    from superset.utils.core import DatasourceName, RowLevelSecurityFilterType
  File "/home/st/venv/lib/python3.8/site-packages/superset/utils/core.py", line 74, in <module>
    from cryptography.hazmat.backends.openssl.x509 import _Certificate
ModuleNotFoundError: No module named 'cryptography.hazmat.backends.openssl.x509'

Please help to resolve the issue to complete the Apache superset installation.

Product Division avatar
nf flag
Please help on this. I'm stuck due to the issue occur
Darkitechtor avatar
gm flag
try to install/reinstall these libraries with commands: pip uninstall pyopenssl pip uninstall cryptography pip install pyopenssl pip install cryptography Maybe you will have to install certain versions of them - it depends on your environment.
Score:1
cc flag

Faced similar issue. Did the following steps and it worked.

downgraded cryptography to 38.0.2 downgraded Flask to 2.1.0 downgraded Werkzeug to 2.0.0

Artur Meinild avatar
vn flag
Could you please detail how this downgrade is performed in a safe way??
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.