Closed ghost closed 1 year ago
This is the key part:
evdev/input.c:10:10: fatal error: Python.h: No such file or directory
This is the Python C header file. Assuming you're on Debian/Ubuntu, sudo apt install python3-dev
should fix this issue. I also had to run sudo pip3 install wheel
before I could install ds4drv.
sudo -H pip install ds4drv Collecting ds4drv Downloading ds4drv-0.5.1-py3-none-any.whl (36 kB) Collecting pyudev>=0.16 Downloading pyudev-0.23.2-py3-none-any.whl (63 kB) |████████████████████████████████| 63 kB 335 kB/s Collecting evdev>=0.3.0 Downloading evdev-1.4.0.tar.gz (26 kB) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pyudev>=0.16->ds4drv) (1.16.0) Building wheels for collected packages: evdev Building wheel for evdev (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-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/setup.py'"'"'; file='"'"'/tmp/pip-install-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/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-vg8nttho cwd: /tmp/pip-install-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/ Complete output (29 lines): 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/evdev copying evdev/ff.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/evtest.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/util.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/uinput.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/genecodes.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/init.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/eventio_async.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/device.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/events.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/eventio.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/ecodes.py -> build/lib.linux-x86_64-3.9/evdev running build_ext running build_ecodes writing ecodes.c (using /usr/include/linux/input.h /usr/include/linux/input-event-codes.h /usr/include/linux/uinput.h) building 'evdev._input' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/evdev x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c evdev/input.c -o build/temp.linux-x86_64-3.9/evdev/input.o -std=c99 -Wno-error=declaration-after-statement evdev/input.c:10:10: fatal error: Python.h: No such file or directory 10 | #include
| ^
~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1ERROR: Failed building wheel for evdev Running setup.py clean for evdev Failed to build evdev Installing collected packages: pyudev, evdev, ds4drv Running setup.py install for evdev ... 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-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/setup.py'"'"'; file='"'"'/tmp/pip-install-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/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-cum3k7_3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/evdev cwd: /tmp/pip-install-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/ Complete output (28 lines): 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/evdev copying evdev/ff.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/evtest.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/util.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/uinput.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/genecodes.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/init.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/eventio_async.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/device.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/events.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/eventio.py -> build/lib.linux-x86_64-3.9/evdev copying evdev/ecodes.py -> build/lib.linux-x86_64-3.9/evdev running build_ext ecodes.c already exists ... skipping build_ecodes building 'evdev._input' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/evdev x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c evdev/input.c -o build/temp.linux-x86_64-3.9/evdev/input.o -std=c99 -Wno-error=declaration-after-statement evdev/input.c:10:10: fatal error: Python.h: No such file or directory 10 | #include
| ^
~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/setup.py'"'"'; file='"'"'/tmp/pip-install-n_qu6op0/evdev_15c7c55a9d8f4f2da39cc0c400f9db48/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-cum3k7_3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/evdev Check the logs for full command output.