我正在尝试安装由 pryproject.toml 和 setup.cfg 文件定义的 python 包。我能够在 Ubuntu 20.04.1 LTS 中使用 `pip install .`` 安装该软件包。但是当我尝试在带有 m1 芯片的 Macbook 的 python 虚拟环境(python 3.9)中安装时,出现以下错误。
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
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 greenlet
Building wheel for roundrobin (pyproject.toml) ... done
Created wheel for roundrobin: filename=roundrobin-0.0.4-py3-none-any.whl size=4017 sha256=d7f7d00ddb6967eacd3f5cd086371e5ed2a4dc56017fcb1749750659544b49ef
Stored in directory: /private/var/folders/mm/c7m9dm551_v9_4gdd1zbps9r0000gn/T/pip-ephem-wheel-cache-911t0hws/wheels/f0/a5/95/f5228e0966ecd65b54419065aefc1892af1fc06652fcb9f4d0
Successfully built cortex python-multipart databricks-cli Flask-BasicAuth roundrobin
Failed to build greenlet
ERROR: Could not build wheels for greenlet, which is required to install pyproject.toml-based projects
当我尝试下载 Flask-SQLAlchemy 时遇到了一些问题,我在终端中使用了下面的代码并且它有效:
pip install --only-binary :all: greenlet
pip install --only-binary :all: Flask-SQLAlchemy
Python 包通常作为“轮子”(.whl 文件)分发,它们是预编译的二进制包。尝试使用轮子而不是源代码分发来安装“greenlet”和“Flask-SQLAlchemy”`