Skip to content

Can't install cChardet on my ARM64 machine #74

@ghost

Description

OS/Arch

('Linux', 'S905X', '5.9.8-meson64', '#trunk SMP PREEMPT Thu Nov 12 23:40:19 UTC 2020', 'aarch64', 'aarch64')

Python version

Python 3.8.8

cChardet version

2.1.7 and below version

What is the problem?

Can't install cchardet. Maybe it's because setup.py

Expected behavior

It can install normally

Actual behavior

Showing error

Collecting cchardet
Using cached cchardet-2.1.7.tar.gz (653 kB)
Building wheels for collected packages: cchardet
Building wheel for cchardet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/setup.py'
"'"'; file='"'"'/tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().
replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-gfswq87_
cwd: /tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/
Complete output (24 lines):
cythonize: ['src/cchardet/_cchardet.pyx']
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/cchardet
copying src/cchardet/version.py -> build/lib.linux-aarch64-3.8/cchardet
copying src/cchardet/init.py -> build/lib.linux-aarch64-3.8/cchardet
running build_ext
building 'cchardet._cchardet' extension
creating build/temp.linux-aarch64-3.8
creating build/temp.linux-aarch64-3.8/src
creating build/temp.linux-aarch64-3.8/src/cchardet
creating build/temp.linux-aarch64-3.8/src/ext
creating build/temp.linux-aarch64-3.8/src/ext/uchardet
creating build/temp.linux-aarch64-3.8/src/ext/uchardet/src
creating build/temp.linux-aarch64-3.8/src/ext/uchardet/src/LangModels
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack
-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/ext/uchardet/src -I/usr/include/python3.8 -c src/cchardet/_cchardet.cpp -
o build/temp.linux-aarch64-3.8/src/cchardet/_cchardet.o
src/cchardet/_cchardet.cpp:4:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
ERROR: Failed building wheel for cchardet
Running setup.py clean for cchardet
Failed to build cchardet
Installing collected packages: cchardet
Running setup.py install for cchardet ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/setup.py'"'"'; file='"'"'/tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-okdztqew/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/cchardet
cwd: /tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/
Complete output (24 lines):
cythonize: ['src/cchardet/_cchardet.pyx']
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/cchardet
copying src/cchardet/version.py -> build/lib.linux-aarch64-3.8/cchardet
copying src/cchardet/init.py -> build/lib.linux-aarch64-3.8/cchardet
running build_ext
building 'cchardet._cchardet' extension
creating build/temp.linux-aarch64-3.8
creating build/temp.linux-aarch64-3.8/src
creating build/temp.linux-aarch64-3.8/src/cchardet
creating build/temp.linux-aarch64-3.8/src/ext
creating build/temp.linux-aarch64-3.8/src/ext/uchardet
creating build/temp.linux-aarch64-3.8/src/ext/uchardet/src
creating build/temp.linux-aarch64-3.8/src/ext/uchardet/src/LangModels
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/ext/uchardet/src -I/usr/include/python3.8 -c src/cchardet/_cchardet.cpp -o build/temp.linux-aarch64-3.8/src/cchardet/_cchardet.o
src/cchardet/_cchardet.cpp:4:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/setup.py'"'"'; file='"'"'/tmp/pip-install-hxlmfkru/cchardet_ec84530a651448e8b7d54bd420b69736/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-okdztqew/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/cchardet Check the logs for full command output.

Steps to reproduce the behavior

python3.8 -m pip install cchardet OR pip3 install cchardet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions