Getting weak link error in cryptography-0.8.2 python install

In our linux redhat RHEL 6 cluster, I downloaded cryptography-0.8.2.tar.gz and then launched

python setup.py install --user 

in the cryptography catalog-0.8.2. I get the following error. Can someone help me solve this problem? I don’t have time for weak links, I’m just trying to install a cryptographic module. Many thanks!

rcook@rzgpu2 (cryptography-0.8.2 ): python setup.py install --user
running install
Traceback (most recent call last):
  File "setup.py", line 342, in <module>
    **keywords_with_side_effects(sys.argv)
  File "/usr/apps/python/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/apps/python/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/apps/python/lib/python2.7/distutils/dist.py", line 971, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/apps/python/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "setup.py", line 119, in finalize_options
    self.distribution.ext_modules = get_ext_modules()
  File "setup.py", line 78, in get_ext_modules
    from cryptography.hazmat.bindings.commoncrypto.binding import (
  File "src/cryptography/hazmat/bindings/commoncrypto/binding.py", line 14, in <module>
    class Binding(object):
  File "src/cryptography/hazmat/bindings/commoncrypto/binding.py", line 36, in Binding
    "-framework", "Security", "-framework", "CoreFoundation"
  File "src/cryptography/hazmat/bindings/utils.py", line 97, in build_ffi_for_binding
    extra_link_args=extra_link_args,
  File "src/cryptography/hazmat/bindings/utils.py", line 106, in build_ffi
    ffi.cdef(cdef_source)
  File "/g/g0/rcook/.local/lib/python2.7/site-packages/cffi/api.py", line 106, in cdef
    self._parser.parse(csource, override=override, packed=packed)
  File "/g/g0/rcook/.local/lib/python2.7/site-packages/cffi/cparser.py", line 165, in parse
    self._internal_parse(csource)
  File "/g/g0/rcook/.local/lib/python2.7/site-packages/cffi/cparser.py", line 199, in _internal_parse
    realtype = self._get_type(decl.type, name=decl.name)
  File "/g/g0/rcook/.local/lib/python2.7/site-packages/cffi/cparser.py", line 360, in _get_type
    return self._get_struct_union_enum_type('struct', type, name)
  File "/g/g0/rcook/.local/lib/python2.7/site-packages/cffi/cparser.py", line 434, in _get_struct_union_enum_type
    return self._structnode2type[type]
  File "/usr/apps/python/lib/python2.7/weakref.py", line 256, in __getitem__
    return self.data[ref(key)]
TypeError: cannot create weak reference to 'Struct' object
+4
source share
2 answers

The problem is actually in the pycparser module.

By https://bugs.launchpad.net/openstack-gate/+bug/1446882 do the following:

pip uninstall pycparser && pip install -Iv pycparser==2.10
+7
source

As it turned out, pycparser-2.11 is the culprit of this error / error message.

pip pycparser && & pip install -Iv pycparser == 2.10

+5

Source: https://habr.com/ru/post/1583879/


All Articles