uv icon indicating copy to clipboard operation
uv copied to clipboard

Failed to install cchardet

Open chrisgoddard opened this issue 1 year ago • 5 comments

Error install cchardet==2.1.7

src/cchardet/_cchardet.cpp:196:12: fatal error: 'longintrepr.h' file not found
  #include "longintrepr.h"
           ^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1```

Mac (intel) OSX 14.2.1 - though I had the same issue on my M1.

chrisgoddard avatar Feb 24 '24 00:02 chrisgoddard

Can you please include your uv version, the output of running uv pip install with --verbose, and confirmation that you're able to install this package with pip and --no-cache?

charliermarsh avatar Feb 24 '24 00:02 charliermarsh

Are you on 3.11? It seems cchardet is unsupported on 3.11 and the package seems to be abandoned.

https://github.com/PyYoshi/cChardet/issues/81

But there seems to be a fork: https://github.com/faust-streaming/cChardet

hwong557 avatar Feb 24 '24 02:02 hwong557

Oh weird - 3.12 actually. Normal pip works but I'll check out the fork

chrisgoddard avatar Feb 24 '24 03:02 chrisgoddard

Yeah, cchardet is dead. Fwiw, seems like a lot of people are switching to charset_normalizer anyway

hauntsaninja avatar Feb 24 '24 08:02 hauntsaninja

I'll check that out - quite a few scraping libs have it as an optional dependency for performance.

chrisgoddard avatar Feb 24 '24 18:02 chrisgoddard

I'll check that out - quite a few scraping libs have it as an optional dependency for performance.

FYI there is a mypyc mode for charset-normalizer for some performance improvement: https://charset-normalizer.readthedocs.io/en/latest/community/speedup.html

notatallshaw-gts avatar Feb 26 '24 20:02 notatallshaw-gts

It looks like there's nothing for us to address here. (please let us know if that's not the case)

zanieb avatar Feb 26 '24 23:02 zanieb