Repository navigation
Open
Description
When I run sudo pip install evdev I get this error
WARNING: Ignoring invalid distribution ~heel (/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~heel (/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages)
Collecting evdev
Using cached evdev-1.6.1.tar.gz (26 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: evdev
Building wheel for evdev (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/evdev
copying evdev/util.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/uinput.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/genecodes.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/ff.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/evtest.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/events.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/eventio_async.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/eventio.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/ecodes.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/device.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/__init__.py -> build/lib.linux-x86_64-cpython-311/evdev
running build_ext
running build_ecodes
writing /tmp/pip-install-95yix7gl/evdev_54da4839f83845318289710a6887a19b/evdev/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-cpython-311
creating build/temp.linux-x86_64-cpython-311/evdev
gcc-11 -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/linuxbrew/.linuxbrew/opt/python@3.11/include/python3.11 -c evdev/input.c -o build/temp.linux-x86_64-cpython-311/evdev/input.o -std=c99 -Wno-error=declaration-after-statement
error: command 'gcc-11' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for evdev
Running setup.py clean for evdev
Failed to build evdev
WARNING: Ignoring invalid distribution ~heel (/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages)
Installing collected packages: evdev
Running setup.py install for evdev ... error
error: subprocess-exited-with-error
× Running setup.py install for evdev did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running install
/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/evdev
copying evdev/util.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/uinput.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/genecodes.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/ff.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/evtest.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/events.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/eventio_async.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/eventio.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/ecodes.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/device.py -> build/lib.linux-x86_64-cpython-311/evdev
copying evdev/__init__.py -> build/lib.linux-x86_64-cpython-311/evdev
running build_ext
ecodes.c already exists ... skipping build_ecodes
building 'evdev._input' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/evdev
gcc-11 -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/linuxbrew/.linuxbrew/opt/python@3.11/include/python3.11 -c evdev/input.c -o build/temp.linux-x86_64-cpython-311/evdev/input.o -std=c99 -Wno-error=declaration-after-statement
error: command 'gcc-11' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> evdev
I have gcc install but not gcc-11, is that the issue?
Metadata
Metadata
Assignees
Labels
No labels
Activity
aeghost commentedon Mar 24, 2023
I resolved this using HomeBrew environment.
After installing HomeBrew use
brew install gcc@11Generally I prefer use HomeBrew to manage tools rather than dnf/pacman or apt.
So my Distrib env is still unchanged, and my working tools are all localized in .linuxbrew user env.
coder0xff commentedon Jun 2, 2025
@gvalkov Any chance of getting binary distributions in the Python package? I'd love for my users to not need to run
sudo apt install build-essential python-devand so on.