2

i have a error in python that put this with ssl

Traceback (most recent call last):
  File "wss.txt", line 9, in <module>
    ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS_CLIENT'

so i look on stack, in this link Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT' and found this command to execute sudo python -m easy_install --upgrade pyOpenSSL

but i get this error on linux

Searching for pyOpenSSL
Reading https://pypi.python.org/simple/pyOpenSSL/
Downloading https://files.pythonhosted.org/packages/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz#sha256=9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507
Best match: pyOpenSSL 19.1.0
Processing pyOpenSSL-19.1.0.tar.gz
Writing /tmp/easy_install-DPnzRZ/pyOpenSSL-19.1.0/setup.cfg
Running pyOpenSSL-19.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-DPnzRZ/pyOpenSSL-19.1.0/egg-dist-tmp-i8UJJ1
warning: no previously-included files found matching 'leakcheck'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '*.py' found under directory 'leakcheck'
warning: no previously-included files matching '*.pem' found under directory 'leakcheck'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching '.travis'
zip_safe flag not set; analyzing archive contents...
Moving pyOpenSSL-19.1.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding pyOpenSSL 19.1.0 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/pyOpenSSL-19.1.0-py2.7.egg
Processing dependencies for pyOpenSSL
Searching for cryptography>=2.8
Reading https://pypi.python.org/simple/cryptography/
Downloading https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz#sha256=a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229
Best match: cryptography 2.9.2
Processing cryptography-2.9.2.tar.gz
Writing /tmp/easy_install-I6fgSb/cryptography-2.9.2/setup.cfg
Running cryptography-2.9.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-I6fgSb/cryptography-2.9.2/egg-dist-tmp-s1DZx6
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
c/_cffi_backend.c:15:10: fatal error: ffi.h: Aucun fichier ou dossier de ce type
 #include <ffi.h>
          ^~~~~~~
compilation terminated.
error: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

do you know how can i resolbe this error

Thanks

learner
  • 23
  • 4

0 Answers0