PySimpleGUIWxで使いたかったが、依存ライブラリwxPythonがインストールできなかった。原因はラズパイのCPUアーキテクチャであるARMでビルドされたバイナリファイルがpip
に存在しないから。対策は自前でビルドすることだが、とんでもなく大変そう。諦めた。
成果物
情報源
ライブラリ
PySimpleGUIWxのAPIから簡単にwxWidgetsを使いたい。
pip install wxPython
pip install wxPython
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting wxPython Downloading https://files.pythonhosted.org/packages/b0/4d/80d65c37ee60a479d338d27a2895fb15bbba27a3e6bb5b6d72bb28246e99/wxPython-4.1.1.tar.gz (66.0MB) 100% |████████████████████████████████| 66.0MB 6.5kB/s Collecting pillow (from wxPython) Downloading https://www.piwheels.org/simple/pillow/Pillow-8.2.0-cp37-cp37m-linux_armv7l.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 100kB/s Collecting six (from wxPython) Downloading https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl Collecting numpy (from wxPython) Downloading https://www.piwheels.org/simple/numpy/numpy-1.20.3-cp37-cp37m-linux_armv7l.whl (11.6MB) 100% |████████████████████████████████| 11.6MB 32kB/s Building wheels for collected packages: wxPython Running setup.py bdist_wheel for wxPython ... error Complete output from command /tmp/work/Python.PySimpleGuiWx.SetUp.20210618175521/src/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-lx0goxes/wxPython/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-dis7bbpz --python-tag cp37: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: -c --help [cmd1 cmd2 ...] or: -c --help-commands or: -c cmd --help error: invalid command 'bdist_wheel' ---------------------------------------- Failed building wheel for wxPython Running setup.py clean for wxPython Failed to build wxPython Installing collected packages: pillow, six, numpy, wxPython Running setup.py install for wxPython ... -
ここでフリーズしてしまった。もしかしたら何時間もかかるのかもしれない。
だが、途中で以下のように「ビルドに失敗した」とある。
Failed building wheel for wxPython
なのに「Running setup.py install for wxPython ... -」とインストールに進むのはおかしくないか?
おそらく、その失敗はエラーメッセージを表示し知らせたことをもって良しとしたのだろう。ビルドが失敗した時点で終了してほしかった。インストールが成功するわけもないのに実行してフリーズしてしまうくらいなら。
ちなみに、pip install PySimpleGUIWx
をしても同様にwxPython
を入れようとするため、上記の状態になる。
apt search wxWidgets
参考としてapt
のパッケージを検索してみた。
apt search wxWidgets
結果
ソート中... 完了 全文検索... 完了 bossa/stable 1.3~20120408-5.1 armhf Atmel SAM ARM microcontroller flash programming GUI codeblocks-contrib/testing 17.12.rpi1 armhf contrib plugins for Code::Blocks IDE codeblocks-contrib-dbg/testing 17.12.rpi1 armhf Debugging libraries for the Code::Blocks contrib plugins erlang-wx/stable 1:21.2.6+dfsg-1 armhf Erlang/OTP bindings to wxWidgets filezilla/stable 3.39.0-2+deb10u1 armhf Full-featured graphical FTP/FTPS/SFTP client filezilla-common/stable 3.39.0-2+deb10u1 all Architecture independent files for filezilla fontypython/stable 0.5-1 all Find, view and manage font files of all kinds jmdlx/stable 0.4-9+b1 armhf jugglemaster deluxe using wxWidgets libalien-wxwidgets-perl/stable 0.69+dfsg-2+b1 armhf Perl module for locating wxWidgets binaries libplplotwxwidgets1/stable 5.14.0+dfsg-3 armhf Scientific plotting library (wxWidgets bindings) libwx-glcanvas-perl/stable 0.09-5+b1 armhf Perl interface to wxWidgets' OpenGL canvas libwx-perl/stable 1:0.9932-5+b1 armhf interface to wxWidgets cross-platform GUI toolkit libwx-scintilla-perl/stable 0.39-4+b1 armhf source code editor component for wxWidgets libwxbase3.0-0v5/stable,now 3.0.4+dfsg-8 armhf [インストール済み、自動] wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit libwxbase3.0-dev/stable,now 3.0.4+dfsg-8 armhf [インストール済み、自動] wxBase library (development) - non-GUI support classes of wxWidgets toolkit libwxgtk-media3.0-0v5/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ media library runtime) libwxgtk-media3.0-dev/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ media library development) libwxgtk-media3.0-gtk3-0v5/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ 3 media library runtime) libwxgtk-media3.0-gtk3-dev/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ 3 media library development) libwxgtk-webview3.0-gtk3-0v5/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ 3 webview library runtime) libwxgtk-webview3.0-gtk3-dev/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ 3 webview library development) libwxgtk3.0-0v5/stable,now 3.0.4+dfsg-8 armhf [インストール済み] wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime) libwxgtk3.0-dev/stable,now 3.0.4+dfsg-8 armhf [インストール済み] wxWidgets Cross-platform C++ GUI toolkit (GTK+ development) libwxgtk3.0-gtk3-0v5/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ 3 runtime) libwxgtk3.0-gtk3-dev/stable 3.0.4+dfsg-8 armhf wxWidgets Cross-platform C++ GUI toolkit (GTK+ 3 development) libwxsqlite3-3.0-0/stable 3.4.1~dfsg-3 armhf SQLite3 C++ wrapper for use in programs based on the wxWidgets libwxsqlite3-3.0-dev/stable 3.4.1~dfsg-3 armhf Development files for wxSQLite3 libwxsvg-dev/stable 2:1.5.15+dfsg.2-1 armhf Development files for wxSVG libwxsvg-tools/stable 2:1.5.15+dfsg.2-1 armhf SVG library for the wxWidgets toolkit (tools) libwxsvg3/stable 2:1.5.15+dfsg.2-1 armhf SVG library for the wxWidgets toolkit openbabel-gui/stable 2.4.1+dfsg-3 armhf Chemical toolbox utilities (graphical user interface) plplot-driver-wxwidgets/stable 5.14.0+dfsg-3 armhf Scientific plotting library (wxWidgets driver) poedit/stable 2.2.1-2 armhf gettext catalog editor poedit-common/stable 2.2.1-2 all Common files for poedit pyro-gui/stable 1:3.16-3 all graphical tool for Pyro python-avc/stable 0.8.3-1.1 all live connection among widgets and application variables python-dsv/stable 1.4.1-7 all Python module for delimiter-separated-value files (Python 2) python-hachoir-wx/stable 0.3-3 all wxWidgets GUI for the hachoir binary parser python-pythoncard/stable 0.8.2-5 all wxPython-based GUI construction framework (underlying Python libraries) python-wxgtk-media3.0/stable 3.0.2.0+dfsg-8 armhf Python interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.media) python-wxgtk-media4.0/stable 4.0.4+dfsg-2 armhf Python interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.media) python-wxgtk-webview3.0/stable 3.0.2.0+dfsg-8 armhf Python interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.html2) python-wxgtk-webview4.0/stable 4.0.4+dfsg-2 armhf Python interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.html2) python-wxgtk3.0/stable 3.0.2.0+dfsg-8 armhf Python interface to the wxWidgets Cross-platform C++ GUI toolkit python-wxgtk3.0-dev/stable 3.0.2.0+dfsg-8 all Development files for wxPython python-wxgtk4.0/stable 4.0.4+dfsg-2 armhf Python interface to the wxWidgets Cross-platform C++ GUI toolkit python-wxtools/stable 3.0.2.0+dfsg-8 all Tools from the wxPython distribution python-wxversion/stable 3.0.2.0+dfsg-8 all API for selecting the wxPython version to use python3-dsv/stable 1.4.1-7 all Python module for delimiter-separated-value files (Python 3) python3-wxgtk-media4.0/stable 4.0.4+dfsg-2 armhf Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.media) python3-wxgtk-webview4.0/stable 4.0.4+dfsg-2 armhf Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.html2) python3-wxgtk4.0/stable 4.0.4+dfsg-2 armhf Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit pythoncard/stable 0.8.2-5 all wxPython-based GUI construction framework (meta-package) pythoncard-doc/stable 0.8.2-5 all wxPython-based GUI construction framework (documentation and samples) pythoncard-tools/stable 0.8.2-5 all wxPython-based GUI construction framework (optional development tools) silverjuke/stable 18.2.1-1 armhf jukebox, karaoke, and kiosk mode mp3 player stx-btree-dev/stable 0.9-2 all b+tree implementation in c++ survex-aven/stable 1.2.38-1 armhf sophisticated cave survey viewer for Survex wx-common/stable,now 3.0.4+dfsg-8 armhf [インストール済み、自動] wxWidgets Cross-platform C++ GUI toolkit (common support files) wx3.0-doc/stable 3.0.4+dfsg-8 all wxWidgets Cross-platform C++ GUI toolkit (documentation) wx3.0-examples/stable 3.0.4+dfsg-8 all wxWidgets Cross-platform C++ GUI toolkit (examples) wx3.0-headers/stable,now 3.0.4+dfsg-8 all [インストール済み、自動] wxWidgets Cross-platform C++ GUI toolkit (header files) wx3.0-i18n/stable 3.0.4+dfsg-8 all wxWidgets Cross-platform C++ GUI toolkit (i18n support) wxglade/stable 0.8.3-2 all GUI designer written in Python with wxPython wxsqlite3-doc/stable 3.4.1~dfsg-3 all Documentation files for wxSQLite3
所感
4つあるうちの1つしか実行できないことを確認できてしまった。これはひどい。期待はずれ。
API | ラッパ元 | 可 | 実行できない理由 |
---|---|---|---|
PySimpleGUI | Tkinter | ☓ | 絵文字フォントがインストールされているとTkinterがエラーになって使えないため。 |
PySimpleGUIQt | Qt | ☓ | pip install PySide2 できないため。apt で入れたものは参照できなかった。※ |
PySimpleGUIWx | wxWidgets | ? | pip install wxPython でビルドに失敗するため。※ |
PySimpleGUIWeb | Remi | ○ | 実行できた! |
対象環境
- Raspbierry pi 4 Model B
- Raspberry Pi OS buster 10.0 2020-08-20 ※
- bash 5.0.3(1)-release
$ uname -a Linux raspberrypi 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l GNU/Linux