错误:无法为 aiohttp 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

2023-11-28

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版本。在 Python 上3.10.6版本安装顺利。

相关问题:yarl/_quoting.c:196:12:致命错误:找不到“longintrepr.h”文件 - 生成 1 个错误


此错误的解决方案:需要更新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

已修复的相应问题的链接:

  • https://github.com/aio-libs/aiohttp/issues/6600
  • https://github.com/aio-libs/yarl/issues/706
  • https://github.com/aio-libs/frozenlist/issues/305
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

错误:无法为 aiohttp 构建轮子,这是安装基于 pyproject.toml 的项目所必需的 的相关文章

随机推荐