evdev==1.6.0というPythonのパッケージををUbuntu20.04 AMD64のPCにインストールする際に、解決できないエラーに躓いています。

はじめは通常通りpip installを試しました。

```

    $ pip install evdev==1.6.0
    
```

以下がエラーメッセージです。

```

    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
      ╰─> [37 lines of output]
          running bdist_wheel
          running build
          running build_py
          creating build
          creating build/lib.linux-x86_64-cpython-37
          creating build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/util.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/device.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/ff.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/eventio_async.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/eventio.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/events.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/ecodes.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/evtest.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/__init__.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/uinput.py -> build/lib.linux-x86_64-cpython-37/evdev
          copying evdev/genecodes.py -> build/lib.linux-x86_64-cpython-37/evdev
          running build_ext
          running build_ecodes
          The 'linux/input.h' and 'linux/input-event-codes.h' include files
          are missing. You will have to install the kernel header files in
          order to continue:
          
              yum install kernel-headers-$(uname -r)
              apt-get install linux-headers-$(uname -r)
              emerge sys-kernel/linux-headers
              pacman -S kernel-headers
          
          In case they are installed in a non-standard location, you may use
          the '--evdev-headers' option to specify one or more colon-separated
          paths. For example:
          
              python setup.py \
                build \
                build_ecodes --evdev-headers path/input.h:path/input-event-codes.h \
                build_ext --include-dirs  path/ \
                install
          [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
    ERROR: Could not build wheels for evdev, which is required to install pyproject.toml-based projects
    
```

メッセージにしたがって以下を試しました。

```

     $sudo apt-get install linux-headers-$(uname -r)
    
```

and the message said it is up-to-date.

```

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    linux-headers-5.15.0-76-generic is already the newest version (5.15.0-76.83~20.04.1).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    
```

インストールされていると言われてしまいました。  
なにか解決策、試すべきことをご存知の方いれば教えていただきたいです。よろしくおねがいします。
CC BY-SA 4.0
2023-07-17T09:25:15.620
95660
2023-07-17T23:50:53.233
2023-07-17T09:42:09.000
59136
59136
question
python ubuntu pip apt
evdev==1.6.0 パッケージがインストールできない。
ヘッダーファイル, つまりinput.hとinput-event-codes.hが誤った場所に保存されていたので、searchで場所を特定し,
/usr/includes/linux/ にコピーすることで解決しました。
CC BY-SA 4.0
2023-07-17T23:50:53.233
95665
2023-07-17T23:50:53.233
59136
95660
answer