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 is not compatible with cchardet #11

Open
nailend opened this issue Apr 11, 2023 · 1 comment
Open

Python3.11 is not compatible with cchardet #11

nailend opened this issue Apr 11, 2023 · 1 comment

Comments

@nailend
Copy link
Contributor

nailend commented Apr 11, 2023

Python3.11 is not compatible with cchardet, however cchardet is abandoned.
More info here: https://bugzilla.redhat.com/show_bug.cgi?id=2021804

There is a fork fixing this https://github.com/faust-streaming/cChardet

However, I fixed python to <3.11 to solve the problem

Package operations: 28 installs, 2 updates, 0 removals

  • Updating cchardet (2.1.7 /home/conda/feedstock_root/build_artifacts/cchardet_1666947729218/work -> 2.1.7): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  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/local/RL-INSTITUT/julian.endres/miniconda3/envs/data_adapter_oemof/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/local/RL-INSTITUT/julian.endres/miniconda3/envs/data_adapter_oemof/include -fPIC -O2 -isystem /home/local/RL-INSTITUT/julian.endres/miniconda3/envs/data_adapter_oemof/include -fPIC -Isrc/ext/uchardet/src -I/tmp/tmp2vekkp3q/.venv/include -I/home/local/RL-INSTITUT/julian.endres/miniconda3/envs/data_adapter_oemof/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: Datei oder Verzeichnis nicht gefunden
    196 |   #include "longintrepr.h"
        |            ^~~~~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  

  at ~/miniconda3/envs/data_adapter_oemof/lib/python3.11/site-packages/poetry/installation/chef.py:152 in _prepare
      148│ 
      149│                 error = ChefBuildError("\n\n".join(message_parts))
      150│ 
      151│             if error is not None:
    → 152│                 raise error from None
      153│ 
      154│             return path
      155│ 
      156│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with cchardet (2.1.7) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "cchardet (==2.1.7)"'.
@henhuy
Copy link
Contributor

henhuy commented Apr 24, 2023

Thanks for fixing python version.
This bug is coming from very old dependency tableschema.
As tableschema has been replaced by frictionless, but frictionless is currently not working with oemof.tabular.
Thus fixing python to <3.11 is the simpliest solution for now.

nailend added a commit that referenced this issue Jun 1, 2023
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