AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
AvatarBhola opened this issue · 2 comments
When I tried installing Pyas2 I keep getting this error.
File "/django_pyas2/manage.py", line 22, in
main()
File "/django_pyas2/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 395, in execute
django.setup()
File "/usr/local/lib/python3.7/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.7/site-packages/pyas2/models.py", line 16, in
from pyas2lib import (
File "/usr/local/lib/python3.7/site-packages/pyas2lib/init.py", line 7, in
from pyas2lib.as2 import Mdn
File "/usr/local/lib/python3.7/site-packages/pyas2lib/as2.py", line 14, in
from pyas2lib.cms import (
File "/usr/local/lib/python3.7/site-packages/pyas2lib/cms.py", line 17, in
from pyas2lib.utils import normalize_digest_alg
File "/usr/local/lib/python3.7/site-packages/pyas2lib/utils.py", line 13, in
from OpenSSL import crypto
File "/usr/local/lib/python3.7/site-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py", line 3279, in
_lib.OpenSSL_add_all_algorithms()
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
Downgrading cryptography with pip install cryptography==38.0.4
fixed this for me.
Downgrading cryptography with
pip install cryptography==38.0.4
fixed this for me.
thank you