python编译安装error ffi ctype_带有ffi.from_buffer(b“”)错误的PyOpenSSL

在尝试使用pip3安装Python包时遇到了错误,具体表现为在导入OpenSSL模块时,由于ffi.from_buffer(b“”)导致TypeError。此问题涉及到Python的编译安装和OpenSSL库的兼容性,需要对Python环境和ffi库进行排查和修复。
摘要由CSDN通过智能技术生成

***Traceback(most recent call last):File"/usr/local/bin/pip3",line11,insys.exit(main())File"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py",line73,inmain

command=create_command(cmd_name,isolated=("--isolated"incmd_args))File"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_internal/commands/__init__.py",line96,increate_command

module=importlib.import_module(module_path)File"/usr/lib/python3.5/importlib/__init__.py",line126,inimport_modulereturn_bootstrap._gcd_import(name[level:],package,level)File"",line986,in_gcd_importFile"",line969,in_find_and_loadFile"",line958,in_find_and_load_unlockedFile"",line673,in_load_unlockedFile"",line665,inexec_moduleFile"",line222,in_call_with_frames_removedFile"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_internal/commands/install.py",line24,infrompip._internal.cli.req_commandimportRequirementCommandFile"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_internal/cli/req_command.py",line15,infrompip._internal.index.package_finderimportPackageFinderFile"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_internal/index/package_finder.py",line21,infrompip._internal.index.collectorimportparse_linksFile"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_internal/index/collector.py",line12,infrompip._vendorimporthtml5lib,requestsFile"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_vendor/requests/__init__.py",line97,infrompip._vendor.urllib3.contribimportpyopensslFile"/home/srnadmin/.local/lib/python3.5/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py",line46,inimportOpenSSL.SSLFile"/usr/local/lib/python3.5/dist-packages/OpenSSL/__init__.py",line8,infromOpenSSLimportcrypto,SSLFile"/usr/local/lib/python3.5/dist-packages/OpenSSL/crypto.py",line15,infromOpenSSL._utilimport(File"/usr/local/lib/python3.5/dist-packages/OpenSSL/_util.py",line152,inwithffi.from_buffer(b""):TypeError:from_buffer()cannotreturnthe address of the raw string within a bytesorunicodeorbytearray object***

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值