When I tried to run a certain Python application on ubuntu 20.04 on raspberry pi 4, I was angry that wx was missing. If you wonder what wx is, it's wxPython. So I installed wxPython.
There is no corresponding package for pip itself, and building from the source code of the wxPython homepage did not work.
[This site](https://krhb.hatenablog.com/entry/2019/04/30/234953#ImportError-No-module-named-wx%E3%81%AE%E3%82%A8%E3%83 The method introduced in% A9% E3% 83% BC) was helpful.
Techniques introduced
$ pip install -U \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
wxPython
Or changed the ubuntu version
$ pip install -U \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \
wxPython
Then it was an error on the way. However, the source code used here https://files.pythonhosted.org/packages/cb/4f/1e21d3c079c973ba862a18f3be73c2bbe2e6bc25c96d94df605b5cbb494d/wxPython-4.1.0.tar.gz I built it myself and it was successful.
$ wget https://files.pythonhosted.org/packages/cb/4f/1e21d3c079c973ba862a18f3be73c2bbe2e6bc25c96d94df605b5cbb494d/wxPython-4.1.0.tar.gz
$ tar xvf wxPython-4.1.0.tar.gz
$ cd wxPython-4.1.0
$ python build.py etg sip build build_py
$ python build bdist_wheel
$ pip install dist/wxPython-4.1.1a1-cp36-cp36m-linux_aarch64.whl
$ python -c "import wx;print(wx.__version__)"
4.1.1a1
Recommended Posts