linux yarl/_引用,c:196:12:致命错误:找不到'longintrepr.h'档案-产生1个错误

wtlkbnrh  于 2022-11-28  发布在  Linux
关注(0)|答案(1)|浏览(1146)

Python版本:3.11
通过pip install -r requirements.txt为应用程序安装依赖项时会出现以下错误。此错误特定于Python 3.11版本。在3.10.6版本的Python上,安装会很顺利。
相关问题: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.
mu0hgdu0

mu0hgdu01#

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:

相关问题