前提・実現したいこと
python3でevdevと依存関係にあるpynputというモジュールをインストールしようとしているのですが、インストール中にエラーが起きてしまいます。エラーメッセージを見てもいまいち解決策がわからなかったので、わかる方がいれば教えていただけると幸いです。
実行環境
実行環境はiPhone11で、Alpine_LinuxベースのiSHというアプリを使ってターミナルを利用しています。
エラーメッセージ中に「linux-i686-3.8のライブラリのビルドが~」と表示されていたので、iOSでLinuxのターミナルを利用しているのが原因なのかと個人的には思っています。
該当のソースコード
ash
1$ python3 -m pip install pynput
発生している問題・エラーメッセージ
全文を載せているのでかなり長いです。
Collecting pynput Downloading pynput-1.7.2-py2.py3-none-any.whl (99 kB) |███▎ | 10 kB 640 |██████▋ | 20 kB 748 |█████████▉ | 30 kB 801 |█████████████▏ | 40 kB 822 |████████████████▌ | 51 kB 854 |███████████████████▊ | 61 kB 853 |███████████████████████ | 71 kB 866 |██████████████████████████▍ | 81 kB 887 |█████████████████████████████▋ | 92 kB 897 |████████████████████████████████| 99 kB 608 kB/s Collecting evdev>=1.3 Downloading evdev-1.4.0.tar.gz (26 kB) Requirement already satisfied: python-xlib>=0.17 in /usr/lib/python3.8/site-packages (from pynput) (0.29) Requirement already satisfied: six in /usr/lib/python3.8/site-packages (from pynput) (1.15.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-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/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-iyq0a8w2 cwd: /tmp/pip-install-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/ Complete output (37 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-i686-3.8 creating build/lib.linux-i686-3.8/evdev copying evdev/ff.py -> build/lib.linux-i686-3.8/evdev copying evdev/evtest.py -> build/lib.linux-i686-3.8/evdev copying evdev/device.py -> build/lib.linux-i686-3.8/evdev copying evdev/util.py -> build/lib.linux-i686-3.8/evdev copying evdev/events.py -> build/lib.linux-i686-3.8/evdev copying evdev/ecodes.py -> build/lib.linux-i686-3.8/evdev copying evdev/__init__.py -> build/lib.linux-i686-3.8/evdev copying evdev/uinput.py -> build/lib.linux-i686-3.8/evdev copying evdev/genecodes.py -> build/lib.linux-i686-3.8/evdev copying evdev/eventio.py -> build/lib.linux-i686-3.8/evdev copying evdev/eventio_async.py -> build/lib.linux-i686-3.8/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 ---------------------------------------- ERROR: Failed building wheel for evdev Running setup.py clean for evdev Failed to build evdev Installing collected packages: evdev, pynput 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-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/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-bwtzdavm/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/evdev cwd: /tmp/pip-install-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/ Complete output (37 lines): running install running build running build_py creating build creating build/lib.linux-i686-3.8 creating build/lib.linux-i686-3.8/evdev copying evdev/ff.py -> build/lib.linux-i686-3.8/evdev copying evdev/evtest.py -> build/lib.linux-i686-3.8/evdev copying evdev/device.py -> build/lib.linux-i686-3.8/evdev copying evdev/util.py -> build/lib.linux-i686-3.8/evdev copying evdev/events.py -> build/lib.linux-i686-3.8/evdev copying evdev/ecodes.py -> build/lib.linux-i686-3.8/evdev copying evdev/__init__.py -> build/lib.linux-i686-3.8/evdev copying evdev/uinput.py -> build/lib.linux-i686-3.8/evdev copying evdev/genecodes.py -> build/lib.linux-i686-3.8/evdev copying evdev/eventio.py -> build/lib.linux-i686-3.8/evdev copying evdev/eventio_async.py -> build/lib.linux-i686-3.8/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 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7sqik1mu/evdev_fc21af52a1e24f988a8bb73ecabec919/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-bwtzdavm/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/evdev Check the logs for full command output.
試したこと
試してみたこと一覧です
- wheel(パッケージ管理システム)のインストール
- gccのインストール
- alpine-sdk(build-essential)のインストール
- キャッシュの削除
ちなみにpytubeはインストールできたので、pip自体に問題があるわけではなさそうです。
回答1件
あなたの回答
tips
プレビュー