Build wxPython on Ubuntu 20.04 on raspberry pi 4

Overview

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.

What i did

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

Build wxPython on Ubuntu 20.04 on raspberry pi 4
Set swap space on Ubuntu on Raspberry Pi
Build OpenCV-Python environment on Raspberry Pi B +
pigpio on Raspberry pi
build Python on Ubuntu
Cython on Raspberry Pi
Build a Django environment on Raspberry Pi (MySQL)
Play with your Ubuntu desktop on your Raspberry Pi 4
Build a Python development environment on Raspberry Pi
Build an Arch Linux environment on Raspberry Pi
Introduced pyenv on Raspberry Pi
Use NeoPixel on Raspberry Pi
Install OpenCV4 on Raspberry Pi 3
Install TensorFlow 1.15.0 on Raspberry Pi
Build an OpenCV4 environment on Raspberry Pi using Poetry
Testing uart communication on Raspberry Pi
MQTT on Raspberry Pi and Mac
Install ghoto2 on Raspberry Pi (memo)
Try using ArUco on Raspberry Pi
OpenCV installation procedure on Raspberry Pi
Power on / off Raspberry pi on Arduino
Detect switch status on Raspberry Pi 3
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Install OpenMedia Vault 5 on Raspberry Pi 4
L Chika on Raspberry Pi C #
"Honwaka Notification Lamp" on Raspberry Pi Part 2
Detect "brightness" using python on Raspberry Pi 3!
USB boot on Raspberry Pi 4 Model B
"Honwaka Notification Lamp" on Raspberry Pi Part 1
Build a Tensorflow environment with Raspberry Pi [2020]
Enable UART + serial communication on Raspberry Pi
Adafruit Python BluefruitLE works on Raspberry Pi.
Accelerate Deep Learning on Raspberry Pi 4 CPU
Programming normally with Node-RED programming on Raspberry Pi 3
Use the Grove sensor on the Raspberry Pi
Install 64-bit OS (bate) on Raspberry Pi
"Honwaka Notification Lamp" on Raspberry Pi Part 3
Working with sensors on Mathematica on Raspberry Pi
Detect temperature using python on Raspberry Pi 3!
Mount Windows shared folder on Raspberry Pi
Matrix multiplication on Raspberry Pi GPU (Part 2)
How to install NumPy on Raspberry Pi
I installed OpenCV-Python on my Raspberry Pi
Working with GPS on Raspberry Pi 3 Python
Shebang on Ubuntu 20.04
Raspberry Pi backup
Why detectMultiScale () is slow on Raspberry Pi B +
Build python environment with pyenv on EC2 (ubuntu)
Build Python3.5 + matplotlib environment on Ubuntu 12 using Anaconda
Detect slide switches using python on Raspberry Pi 3!
[Latest] How to build Java environment on Ubuntu
[Note] Install wxPython 3.x on Linux Mint (Ubuntu)
Try using a QR code on a Raspberry Pi
Detect magnet switches using python on Raspberry Pi 3!
Deploy Django apps on Ubuntu + Nginx + MySQL (Build)
Enjoy electronic work with GPIO on Raspberry Pi
Power on / off your PC with raspberry pi
Use Grove-Temperature & Humidity Sensor (DHT11) on Raspberry Pi
Make DHT11 available on Raspberry Pi + python (memo)
Sound the buzzer using python on Raspberry Pi 3!
Build a Kubernetes environment for development on Ubuntu