提问人:Nankin 提问时间:2/4/2023 更新时间:2/27/2023 访问量:141
安装 dbx 时出错 - pip install dbx - pipenv 错误 cffi
ERROR installing dbx - pip install dbx - pipenv error cffi
问:
我正在尝试使用以下说明设置与 Databricks 的 Visual Studio Code 连接:https://docs.databricks.com/dev-tools/ide-how-to.htmlpyenv
当我尝试安装 dbx () 时,cffi 软件包上出现错误。我正在使用 Python 3.8.9 和 pip 23.00。pip install dbx
我得到的错误块是:
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
c/_cffi_backend.c:2:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: cffi, binaryornot, aiosignal, gitpython, databricks-cli, cryptography, arrow, aiohttp, mlflow-skinny, jinja2-time, cookiecutter, dbx
Running setup.py install for cffi ... error
error: subprocess-exited-with-error
× Running setup.py install for cffi did not run successfully.
│ exit code: 1
...
c/_cffi_backend.c:2:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> cffi
如果有帮助,机器软件规格是(sw_vers输出):
ProductName: macOS
ProductVersion: 12.3
BuildVersion: 21E230
我不是开发人员,我对这些事情没有太多控制权,但我读到它可能与 gcc 有关。这是 的输出:gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
另一方面,很明显没有安装 cffi,因为:pip show cffi
WARNING: Package(s) not found: cffi
答: 暂无答案
评论
python-dev
(dbx_demo) josepferre@joseps-macbook-pro dbx_demo % xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates
xcode-select --reset