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/