python - 错误:Apple Arm64 ABI 需要 ffi_prep_cif_var
问题描述
我已将我的 Intel mac 更新为 Big Sur v11.0.1
,并且对我的一个工作项目的依赖失败。我不使用 python,所以不确定如何处理这个错误。我所有其他 pip 安装都没有问题。
因此,当我运行时pip3 install pyOpenSSL
,它会因错误而失败Using cached cryptography-3.2.1.tar.gz
:
ERROR: Command errored out with exit status 1:
command: /<my-project>/venv/bin/python3 /<my-project>/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/gg/djb6q6054pxf6rzpjg516k9c0000gn/T/pip-build-env-bj2qm41h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
#error Apple Arm64 ABI requires ffi_prep_cif_var
^
c/_cffi_backend.c:6304:9: warning: 'ffi_prep_closure' is deprecated [-Wdeprecated-declarations]
if (ffi_prep_closure(closure, &cif_descr->cif,
^
/usr/local/Cellar/libffi/3.3/include/ffi.h:341:18: note: 'ffi_prep_closure' has been explicitly marked deprecated here
__attribute__((deprecated))
^
1 warning and 1 error generated.
error: command 'clang' failed with exit status 1
我在 repos 中看到了一些问题,例如 this issue和 this issue,但由于我经常不使用 python 或 pip,我不确定根错误是什么或如何修复。
任何建议或见解将不胜感激。
解决方案
为了解除这个错误,我使用官方文档3.9
中的步骤安装了 python 。然后在我的项目中运行命令。
# delete my venv folder first
python3.9 -m venv venv
pip install -r requirements.txt
所有要求(包括 pyOpenSSL)现在都按预期安装和工作。
我仍然无法在 python 中使用它3.8
,所以升级到3.9
.
推荐阅读
- javascript - 在 React SharePoint WebPart 中,使用“html-react-parser”和使用“dompurify eslint-plugin-risxss”安全地显示 HTML 有什么区别
- python - 从dicts列表导出到excel
- java - JUnit 测试模拟对象返回空值
- python - 如何按年龄范围对数据框的数据进行分组?
- android - 如何从 node.js 服务器向 ionic react 应用程序发送推送通知
- gradle - 如何将 jaxb-gradle-plugin 迁移到 Java 11 支持的较新版本
- r - R - 将数据帧中的值与聚合数据帧进行比较
- ios - 单击 iOS 中的按钮时,如何调整 Firebase SnapshotListener 限制?
- javascript - 使用 axios 和 React FE 将包含文件的 JSON 发送到 Flask BE
- r - 使用 filter 和 dplyr - R 计算假人的频率