ruamel.yaml w/out ARM上的C编译器



我试图在没有C编译器的树莓派系统上安装ruamel.yaml,但在安装ruamel.yaml.clib时遇到构建错误(粘贴在下面(。

我看到这是以前针对ruamel.yaml>=0.15.41, <0.16.0(如何在没有本机扩展的情况下安装ruamel.yaml(解决的问题。

请注意,在下面的输出中,path from buildroot在运行pip-install的设备上无效,而是来自生成映像的设备。

$ pip install ruamel.yaml~=0.16
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting ruamel.yaml~=0.16
Using cached ruamel.yaml-0.17.10-py3-none-any.whl (108 kB)
Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.10"
Using cached ruamel.yaml.clib-0.2.6.tar.gz (180 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zdtfb19x
cwd: /tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/
Complete output (3 lines):
sys.argv ['/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-zdtfb19x']
test compiling /tmp/tmp_ruamel_5les1064/test_ruamel_yaml.c -> test_ruamel_yaml compile error: /tmp/tmp_ruamel_5les1064/test_ruamel_yaml.c
Exception: command '{path from buildroot}/aarch64-buildroot-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

一个优选的解决方案是为ARM体系结构提供ruamel.yaml.clib轮子,或者使clib依赖性可选(pip install ruamel.yaml[clib](

我不确定为什么它在0.16之后中断,但我会试着看看为什么它再次失败(可能是setuptools现在抛出了一个不同的Exception,但没有被捕获(。

aarch64体系结构中ruamel.yaml.clib的轮子可用于piwheels。

您应该能够在添加后安装这些:

[global]
extra-index-url=https://www.piwheels.org/simple

至CCD_ 9。

免责声明:我无法控制piwheels上的轮子是如何生成的。

最新更新