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

问题描述 投票:0回答:1

我想安装 twint,但我总是犯以下错误:

"error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-312
      creating build/lib.linux-aarch64-cpython-312/cchardet
      copying src/cchardet/__init__.py -> build/lib.linux-aarch64-cpython-312/cchardet
      copying src/cchardet/version.py -> build/lib.linux-aarch64-cpython-312/cchardet
      running build_ext
      building 'cchardet._cchardet' extension
      creating build/temp.linux-aarch64-cpython-312
      creating build/temp.linux-aarch64-cpython-312/src
      creating build/temp.linux-aarch64-cpython-312/src/cchardet
      creating build/temp.linux-aarch64-cpython-312/src/ext
      creating build/temp.linux-aarch64-cpython-312/src/ext/uchardet
      creating build/temp.linux-aarch64-cpython-312/src/ext/uchardet/src
      creating build/temp.linux-aarch64-cpython-312/src/ext/uchardet/src/LangModels
      aarch64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/ext/uchardet/src -I/usr/include/python3.12 -c src/cchardet/_cchardet.cpp -o build/temp.linux-aarch64-cpython-312/src/cchardet/_cchardet.o
      src/cchardet/_cchardet.cpp:196:12: fatal error: longintrepr.h: No such file or directory
        196 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-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 cchardet
  Running setup.py clean for cchardet
Failed to build cchardet
ERROR: Could not build wheels for cchardet, which is required to install pyproject.toml-based projects"
python pip
1个回答
0
投票

twint支持Python 3.6 - 3.8。您可能必须使用受支持的 Python 版本并通过运行 pip install twint

pip3 install twint
安装
twint

您可以在 PyPi 上找到此软件包的其他安装选项。

© www.soinside.com 2019 - 2024. All rights reserved.