gpt4 book ai didi

python - 在 cryptography-0.8.2 python 安装中出现 "weak reference"错误

转载 作者:太空狗 更新时间:2023-10-30 01:50:58 25 4
gpt4 key购买 nike

在我们的 linux redhat RHEL 6 集群上,我下载了 cryptography-0.8.2.tar.gz 然后运行

python setup.py install --user 

在 cryptography-0.8.2 目录中。我收到以下错误。谁能帮我解决?我没有跟上弱引用的速度,只是想安装密码模块。非常感谢!

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

最佳答案

问题实际上出在pycparser模块。

根据 https://bugs.launchpad.net/openstack-gate/+bug/1446882执行以下操作:

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

关于python - 在 cryptography-0.8.2 python 安装中出现 "weak reference"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29784651/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com