Pipx 构建包失败

Pipx failed to build packages

当我 运行 命令 pipx install eth-brownie 时,我收到以下错误消息,

fatal error from pip prevented installation. Full pip output in file:
    /Users/gentgjonbalaj/.local/pipx/logs/cmd_2021-10-22_11.10.14_pip_errors.log

pip failed to build package:
    cytoolz

Some possibly relevant errors from pip install:
    cytoolz/functoolz.c:23087:19: error: implicit declaration of function '_PyGen_Send' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    cytoolz/functoolz.c:23092:19: error: implicit declaration of function '_PyGen_Send' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    cytoolz/functoolz.c:23176:19: error: implicit declaration of function '_PyGen_Send' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    error: command '/usr/bin/clang' failed with exit code 1

Error installing eth-brownie.

我尝试使用命令“pip install eth-brownie”,但我的终端显示“找不到 pip 命令”。

我遇到了同样的问题,请使用 pip 而不是 pipx。 命令:pip install eth-brownie

我收到了同样的错误,在 运行 以下命令后终于能够解决:

使用自制软件: 酿造安装记录类

brew 安装 cython

xcrun codesign --sign - "/Users/jon/Library/Python/3.8/lib/python/site-packages/regex/_regex.cpython-38-darwin.so"

pip3 安装 cytoolz

pip3 安装 pybind11

M1 Mac 芯片有问题。有两个方面的问题。 (a) cytoolz, (b) regex==2021.10.8.

(a) cytoolz 通过 pip install cytoolz 而不是 pipx 得到解决

(b) 正则表达式问题是个大问题。问题出在版本上。打包错误导致 x86_64 正则表达式被安装在 Apple Silicon (M1) 设备 (https://githubmemory.com/@dragos-vlad) 上。要解决此问题:将正则表达式固定到 2021.9.30 应该暂时有效。但是为此,您必须更改用于安装的 brownie git 中的要求。

我在使用 python 3.10 时遇到了这个问题。尝试 pyenv 并使用 python 3.9.1 即可。

对于使用 Windows 10 的任何人,我遇到了同样的问题,只需要 运行:

pip install Cython

然后

pip install eth-brownie

无论出于何种原因,我终于能够使用 pip 安装但不能使用 pipx。

对于在 windows 上使用 Python 3.10 的任何人,简单 运行

 pip install eth-brownie   

当我使用 pip3 install eth-brownie 而不是 pipx

时它对我有用

在 Python 3.10 中对我有用的是在 brownie 之前安装 cython 和 cytoolz。

输入这三个命令:

python3 -m pip install --user cython
python3 -m pip install --user cytoolz
python3 -m pip install --user eth-brownie