【问题标题】:error: Apple Arm64 ABI requires ffi_prep_cif_var错误:Apple Arm64 ABI 需要 ffi_prep_cif_var
【发布时间】:2021-02-28 04:16:01
【问题描述】:

我已将我的 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 中看到了一些问题,例如 issueissue,但由于我不经常使用 python 或 pip,我不确定根本错误是什么或如何修复。

任何建议或见解将不胜感激。

【问题讨论】:

    标签: python pip pyopenssl python-cryptography


    【解决方案1】:

    为了解除阻止这个错误,我使用offical docs 中的步骤安装了 python 3.9。然后在我的项目中运行命令。

    # delete my venv folder first
    python3.9 -m venv venv
    pip install -r requirements.txt
    

    所有要求(包括 pyOpenSSL)现在都按预期安装和工作。

    我仍然无法在 python 3.8 中使用它,所以升级到 3.9

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-07
      • 2021-07-29
      • 1970-01-01
      • 2019-01-04
      • 1970-01-01
      • 2021-07-07
      相关资源
      最近更新 更多