python - 安装基于 pyproject.toml 的项目所需的错误 : Could not build wheels for aiohttp,

标签 python linux pip aiohttp termux

Python 版本:3.11

通过 pip install -r requirements.txt 安装应用程序的依赖项会出现以下错误:

socket.c -o build/temp.linux-armv8l-cpython-311/aiohttp/_websocket.o
aiohttp/_websocket.c:198:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"                                   
          ^~~~~~~                        1 error generated.
error: command '/data/data/com.termux/files/usr/bin/arm-linux-androideabi-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 aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install
pyproject.toml-based projects

此错误特定于 Python 3.11 版本。在具有 3.10.6 版本的 Python 上安装正常。

相关问题:yarl/_quoting.c:196:12: fatal error: 'longintrepr.h' file not found - 1 error generated

最佳答案

此错误的解决方案:需要更新requirements.txt

不支持 Python 3.11 的模块版本:

aiohttp==3.8.1
yarl==1.4.2
frozenlist==1.3.0

工作版本:

aiohttp==3.8.2
yarl==1.8.1
frozenlist==1.3.1

修复相应问题的链接:

关于python - 安装基于 pyproject.toml 的项目所需的错误 : Could not build wheels for aiohttp,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74550830/

相关文章:

python - Bokeh 中的交互式散点高光

python - "pip install git+[git repo]"的要求?

python - 带有源的 DRF ModelSerializer CharField 未出现在 validated_data 中

python - 如何在后台修复窗口?

c - 为什么我设置xlib窗口背景透明失败?

c - sys_readlink 失败 EFAULT - 备选方案

python - 我在运行 mkdocs serve 命令时遇到问题

python - 我可以使用 `pip` 而不是 `easy_install` 进行 `python setup.py install` 依赖解析吗?

python - 从参数中选择所有非 None 元素并将它们放在 python 字典中的优雅方法是什么?

linux - connman:一次自动连接到多个以太网接口(interface)