magicpdf / Magic-Doc

conversion doc(pdf/html/doc/docx/ppt/pptx)to markdown
Apache License 2.0
30 stars 5 forks source link

why py3.11 pip install fairy-doc[cpu] error #47

Open DTwz opened 2 months ago

DTwz commented 2 months ago

Building wheel for cchardet (setup.py) ... error 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-x86_64-cpython-311 creating build/lib.linux-x86_64-cpython-311/cchardet copying src/cchardet/init.py -> build/lib.linux-x86_64-cpython-311/cchardet copying src/cchardet/version.py -> build/lib.linux-x86_64-cpython-311/cchardet running build_ext building 'cchardet._cchardet' extension creating build/temp.linux-x86_64-cpython-311 creating build/temp.linux-x86_64-cpython-311/src creating build/temp.linux-x86_64-cpython-311/src/cchardet creating build/temp.linux-x86_64-cpython-311/src/ext creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src creating build/temp.linux-x86_64-cpython-311/src/ext/uchardet/src/LangModels gcc -pthread -B /home/PJLAB/wangzhou/anaconda3/envs/py311/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/PJLAB/wangzhou/anaconda3/envs/py311/include -fPIC -O2 -isystem /home/PJLAB/wangzhou/anaconda3/envs/py311/include -fPIC -Isrc/ext/uchardet/src -I/home/PJLAB/wangzhou/anaconda3/envs/py311/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-cpython-311/src/cchardet/_cchardet.o src/cchardet/_cchardet.cpp:196:12: fatal error: longintrepr.h: 没有那个文件或目录 196 | #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 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

icecraft commented 2 months ago

It seems a issue of cpython (https://github.com/python/cpython/pull/28968)