Raspberry Pi 4 install failing: #include <Python.h> − python3-dev
sudo apt install libffi-dev build-essential qrencode jq bc gawk
sudo apt install python3-pip python3-setuptools python3-wheel -y
pip3 install base58
pip3 install silkaj --user
Collecting silkaj
Using cached silkaj-0.7.6-py3-none-any.whl (44 kB)
Collecting texttable
Using cached texttable-1.6.2-py2.py3-none-any.whl (10 kB)
Collecting Click
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting tabulate
Using cached tabulate-0.8.7-py3-none-any.whl (24 kB)
Collecting duniterpy==0.55.1
Using cached duniterpy-0.55.1-py3-none-any.whl (70 kB)
Collecting pynacl
Using cached PyNaCl-1.3.0.tar.gz (3.4 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/xbian/.local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-n7_l90p6/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cffi>=1.4.1; python_implementation != '"'"'PyPy'"'"''
cwd: None
Complete output (100 lines):
Collecting setuptools
Using cached setuptools-46.4.0-py3-none-any.whl (583 kB)
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Collecting cffi>=1.4.1
Using cached cffi-1.14.0.tar.gz (463 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py): started
Building wheel for cffi (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qvgbt_2z/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qvgbt_2z/cffi/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-in2uj8s4
cwd: /tmp/pip-install-qvgbt_2z/cffi/
Complete output (36 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/c
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
c/_cffi_backend.c:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qvgbt_2z/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qvgbt_2z/cffi/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-yfv7bcoj/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-n7_l90p6/overlay --compile --install-headers /tmp/pip-build-env-n7_l90p6/overlay/include/python3.7m/cffi
cwd: /tmp/pip-install-qvgbt_2z/cffi/
Complete output (36 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/c
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
c/_cffi_backend.c:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qvgbt_2z/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qvgbt_2z/cffi/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-yfv7bcoj/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-n7_l90p6/overlay --compile --install-headers /tmp/pip-build-env-n7_l90p6/overlay/include/python3.7m/cffi Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /home/xbian/.local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-n7_l90p6/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cffi>=1.4.1; python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
Edited by Moul