Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects

Python version: 3.11

Installing dependencies for an application by pip install -r requirements.txt gives the following error:

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

This error is specific to Python 3.11 version. On Python with 3.10.6 version installation goes fine.

Related question: yarl/_quoting.c:196:12: fatal error: 'longintrepr.h' file not found - 1 error generated

like image 925
Anton Samokat Avatar asked Sep 06 '25 00:09

Anton Samokat


1 Answers

aiohttp support for python 3.11/3.12 is still in beta, if you want to use that upgrade aiohttp version to 3.9.0b0

aiohttp==3.9.0b0

ref : https://github.com/aio-libs/aiohttp/issues/7675

like image 55
kshubham506 Avatar answered Sep 07 '25 21:09

kshubham506