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

cchardet doesn't work with python 3.10+ #73

Closed
brockhaywood opened this issue Aug 5, 2022 · 3 comments
Closed

cchardet doesn't work with python 3.10+ #73

brockhaywood opened this issue Aug 5, 2022 · 3 comments

Comments

@brockhaywood
Copy link
Contributor

brockhaywood commented Aug 5, 2022

  • partridge version: *
  • Python version: 3.10.x
  • Operating System: *nix

Description

cChardet appears to be an abandoned project and is not compatible with python 3.10 (without compiling from source).

PyYoshi/cChardet#77

As a result installing partridge via pip fails

What I Did

#18 96.96   Running setup.py install for cchardet: finished with status 'error'
#18 96.97   error: subprocess-exited-with-error
#18 96.97
#18 96.97   × Running setup.py install for cchardet did not run successfully.
#18 96.97   │ exit code: 1
#18 96.97   ╰─> [24 lines of output]
#18 96.97       running install
#18 96.97       running build
#18 96.97       running build_py
#18 96.97       creating build
#18 96.97       creating build/lib.linux-x86_64-3.10
#18 96.97       creating build/lib.linux-x86_64-3.10/cchardet
#18 96.97       copying src/cchardet/__init__.py -> build/lib.linux-x86_64-3.10/cchardet
#18 96.97       copying src/cchardet/version.py -> build/lib.linux-x86_64-3.10/cchardet
#18 96.97       running build_ext
#18 96.97       building 'cchardet._cchardet' extension
#18 96.97       creating build/temp.linux-x86_64-3.10
#18 96.97       creating build/temp.linux-x86_64-3.10/src
#18 96.97       creating build/temp.linux-x86_64-3.10/src/cchardet
#18 96.97       creating build/temp.linux-x86_64-3.10/src/ext
#18 96.97       creating build/temp.linux-x86_64-3.10/src/ext/uchardet
#18 96.97       creating build/temp.linux-x86_64-3.10/src/ext/uchardet/src
#18 96.97       creating build/temp.linux-x86_64-3.10/src/ext/uchardet/src/LangModels
#18 96.97       gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Isrc/ext/uchardet/src -I/usr/local/include/python3.10 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-3.10/src/cchardet/_cchardet.o
#18 96.97       src/cchardet/_cchardet.cpp: In function ‘int __Pyx_modinit_type_init_code()’:
#18 96.97       src/cchardet/_cchardet.cpp:2466:53: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’; did you mean ‘tp_dict’?
#18 96.97          __pyx_type_8cchardet_9_cchardet_UniversalDetector.tp_print = 0;
#18 96.97                                                            ^~~~~~~~
#18 96.97                                                            tp_dict
#18 96.97       error: command '/usr/bin/gcc' failed with exit code 1
#18 96.97       [end of output]
#18 96.97
#18 96.97   note: This error originates from a subprocess, and is likely not a problem with pip.
#18 96.97 error: legacy-install-failure
#18 96.97
#18 96.97 × Encountered error while trying to install package.
#18 96.97 ╰─> cchardet

It seems like switching back to chardet or optionally using chardet when on python 3.10+ would be potential alternatives.

@brockhaywood
Copy link
Contributor Author

@brockhaywood
Copy link
Contributor Author

Any chance one of the maintainers could follow up on this?

@dget
Copy link
Contributor

dget commented Apr 4, 2023

Thanks for the PR(s) - merged #76!

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