Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3.11: Could not build wheels for cchardet, which is required to install pyproject.toml-based projects #1469

Open
bbelky opened this issue Apr 10, 2024 · 2 comments
Assignees

Comments

@bbelky
Copy link

bbelky commented Apr 10, 2024

Ubuntu22.04
Python 3.11.9

Trying to install dependencies for NeuralChat:
pip install -r requirements_cpu.txt

Error:
Using cached svgwrite-1.4.3-py3-none-any.whl (67 kB)
Building wheels for collected packages: cchardet, lm_eval
Building wheel for cchardet (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for cchardet (pyproject.toml) 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/version.py -> build/lib.linux-x86_64-cpython-311/cchardet
copying src/cchardet/init.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
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Isrc/ext/uchardet/src -I/home/ubuntu/code/.venv/include -I/usr/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-cpython-311/src/cchardet/_cchardet.o
src/cchardet/_cchardet.cpp:4:10: fatal error: Python.h: No such file or directory
4 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-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
Building wheel for lm_eval (pyproject.toml) ... done
Created wheel for lm_eval: filename=lm_eval-0.3.0-py3-none-any.whl size=2658512 sha256=3a3ef3d4a751e99c0e0579be94ec977a8a6fe4aa759200e59c6c41a19f3276cb
Stored in directory: /home/ubuntu/.cache/pip/wheels/94/57/31/c5904145d06479760defd2f846606f66366edb0bfb212be998
Successfully built lm_eval
Failed to build cchardet
ERROR: Could not build wheels for cchardet, which is required to install pyproject.toml-based projects

Could you please help?

@lvliang-intel
Copy link
Collaborator

@bbelky,

Please use python 3.10.

@bbelky
Copy link
Author

bbelky commented Apr 12, 2024

Thank you! The problem is that the doc says 3.11 is supported. I think it is worth updating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants