When I try to install Sergeant package the installation process is failing because of hiredis
package:
intsights@barad-laptop ~> pip3 install sergeant
Defaulting to user installation because normal site-packages is not writeable
Collecting sergeant
Using cached sergeant-0.19.0-py3-none-any.whl
Collecting hiredis==1.*
Using cached hiredis-1.1.0.tar.gz (54 kB)
Requirement already satisfied: msgpack==1.* in ./.local/lib/python3.9/site-packages (from sergeant) (1.0.2)
Requirement already satisfied: redis==3.* in ./.local/lib/python3.9/site-packages (from sergeant) (3.5.3)
Requirement already satisfied: psutil==5.* in /usr/lib64/python3.9/site-packages (from sergeant) (5.7.2)
Requirement already satisfied: pymongo==3.* in ./.local/lib/python3.9/site-packages (from sergeant) (3.11.3)
Requirement already satisfied: orjson==3.* in ./.local/lib/python3.9/site-packages (from sergeant) (3.4.8)
Building wheels for collected packages: hiredis
Building wheel for hiredis (setup.py) ... 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-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/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-n9gwh88z
cwd: /tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/
Complete output (23 lines):
/tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import sys, imp, os, glob, io
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/hiredis
copying hiredis/version.py -> build/lib.linux-x86_64-3.9/hiredis
copying hiredis/__init__.py -> build/lib.linux-x86_64-3.9/hiredis
running build_ext
building 'hiredis.hiredis' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
creating build/temp.linux-x86_64-3.9/vendor
creating build/temp.linux-x86_64-3.9/vendor/hiredis
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ivendor -I/usr/include/python3.9 -c src/hiredis.c -o build/temp.linux-x86_64-3.9/src/hiredis.o
In file included from src/hiredis.c:1:
src/hiredis.h:4:10: fatal error: Python.h: No such file or directory
4 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for hiredis
Running setup.py clean for hiredis
Failed to build hiredis
Installing collected packages: hiredis, sergeant
Running setup.py install for hiredis ... 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-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/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-p49fix7q/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/intsights/.local/include/python3.9/hiredis
cwd: /tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/
Complete output (23 lines):
/tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import sys, imp, os, glob, io
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/hiredis
copying hiredis/version.py -> build/lib.linux-x86_64-3.9/hiredis
copying hiredis/__init__.py -> build/lib.linux-x86_64-3.9/hiredis
running build_ext
building 'hiredis.hiredis' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
creating build/temp.linux-x86_64-3.9/vendor
creating build/temp.linux-x86_64-3.9/vendor/hiredis
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ivendor -I/usr/include/python3.9 -c src/hiredis.c -o build/temp.linux-x86_64-3.9/src/hiredis.o
In file included from src/hiredis.c:1:
src/hiredis.h:4:10: fatal error: Python.h: No such file or directory
4 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-izq_yfv0/hiredis_d1f5e5385e7b487ba634ee1c399d0dbb/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-p49fix7q/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/intsights/.local/include/python3.9/hiredis Check the logs for full command output.