Error installing aiohttp: missing file longintrepr.h

Hi everyone,

I’m trying to install the aiohttp library for my project, but I’m encountering an issue during the installation process. Here’s the error I’m getting:

gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/adminuser/venv/include -I/usr/local/include/python3.11 -c aiohttp/_websocket.c -o build/temp.linux-x86_64-cpython-311/aiohttp/_websocket.o

aiohttp/_websocket.c:198:12: fatal error: longintrepr.h: No such file or directory

198 | #include "longintrepr.h"

| ^~~~~~~~~~~~~~~

compilation terminated.

error: command '/usr/bin/gcc' 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

As I understand it, the problem is related to the absence of the longintrepr.h file in the system. I’m using Python 3.11, and I believe this file should be available. I tried to find it in several places but couldn’t locate it.

I attempted to execute the command sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist to create the locate database, but received the error Load failed: 5: Input/output error.

I’d appreciate any help in resolving this issue. Thank you!

ps here is the link to my repo GitHub - deliriumastrae/dvor_osm_projekt

Hi @deliriumastrae! :wave:

Please can you reformat your post so it’s easier to read? You can use just one set of triple back ticks at the top and bottom of you logs so it gets formatted as a single code block.

To help with your problem, please can you share a link to your repo? If you can’t share a link to your repo, please can you share your requirements.txt file?

Hi @mathcatsand

i hope it’s better so.

i can send u link to my app https://easypressure.streamlit.app/, but i don’t know can u see what i see )

thank u for ur help!!

Use a python version <=3.10 and try again.
Otherwise google for the error message and you will find a lot of temporary solutions…

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.