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

Question:

Python version: 3.11

Installing dependencies for an application by pip install -r requirements.txt gives the error below. This error is specific to Python 3.11 version. On Python with 3.10.6 version installation goes fine.

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

Running setup.py install for yarl ... error
error: subprocess-exited-with-error
× Running setup.py install for yarl did not run successfully. │ exit code: 1
╰─> [45 lines of output]
    ****                      * Accellerated build *                      ****
    /data/data/com.termux/files/home/folder_for_app/venv/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508:
    SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
      warnings.warn(msg, warning_class)         running install
      /data/data/com.termux/files/home/folder_for_app/venv/lib/python3.11/site-packages/setuptools/command/install.py:34:
  SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(                            running build
  running build_py
  creating build
  creating build/lib.linux-armv8l-cpython-311
  creating build/lib.linux-armv8l-cpython-311/yarl
  copying yarl/init.py -> build/lib.linux-armv8l-cpython-311/yarl
  copying yarl/quoting.py -> build/lib.linux-armv8l-cpython-311/yarl 
  running egg_info
    writing yarl.egg-info/PKG-INFO
    writing dependency_links to yarl.egg-info/dependency_links.txt
    writing requirements to yarl.egg-info/requires.txt
    writing top-level names to yarl.egg-info/top_level.txt
    reading manifest file 'yarl.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.cache' found anywhere in distribution
    warning: no previously-included files found matching 'yarl/_quoting.html'
    warning: no previously-included files found matching 'yarl/_quoting.*.so'
    warning: no previously-included files found matching 'yarl/_quoting.pyd'
    warning: no previously-included files found matching 'yarl/_quoting.*.pyd'
    no previously-included directories found matching 'docs/_build'
    adding license file 'LICENSE'               writing manifest file 'yarl.egg-info/SOURCES.txt'
    copying yarl/init.pyi -> build/lib.linux-armv8l-cpython-311/yarl
    copying yarl/_quoting.c -> build/lib.linux-armv8l-cpython-311/yarl
    copying yarl/_quoting.pyx -> build/lib.linux-armv8l-cpython-311/yarl
    copying yarl/py.typed -> build/lib.linux-armv8l-cpython-311/yarl
    running build_ext                           building 'yarl._quoting' extension
    creating build/temp.linux-armv8l-cpython-311      creating build/temp.linux-armv8l-cpython-311/yarl
    arm-linux-androideabi-clang -mfloat-abi=softfp -mfpu=vfpv3-d16 -DNDEBUG -g -fwrapv -O3 -Wall 
    -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3 -march=armv7-a 
    -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3
    -fPIC -I/data/data/com.termux/files/home/folder_for_app/venv/include
    -I/data/data/com.termux/files/usr/include/python3.11
    -c yarl/_quoting.c -o build/temp.linux-armv8l-cpython-311/yarl/_quoting.o
    yarl/_quoting.c:196: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: legacy-install-failure
× Encountered error while trying to install package.
╰─> yarl                                    
note: This is an issue with the package mentioned above, not pip.

Asked By: Anton Samokat

||

Answers:

Solution for this error: need to update requirements.txt.

Not working versions of modules with Python 3.11:

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

Working versions:

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

Links to the corresponding issues with fixes:

Answered By: Anton Samokat
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.