sudo apt install libjpeg-dev libtiff5-dev libnotify-dev libgtk2.0-dev libgtk-3-dev libsdl1.2-dev libgstreamer-plugins-base0.10-dev libwebkitgtk-dev freeglut3 freeglut3-dev
Preferences --> Raspberry Pi Config --> Performance
sudo nano /etc/dphys-swapfile
and change CONF_SWAPFILE=1000
or CONF_SWAPFILE=2000 (needs a reboot, but we will do that
after the next step).
Preferences -> Raspberry Pi Configuration -> At Boot, select To CLI and reboot to CLI.
sudo pip3 install wxPython
(wait a couple of hours and
don't panic.)
sudo raspi-config
and go to BootOptions -> B1
Desktop / CLI -> B4 Desktop Autologin -> double 'TAB' ->
Finish and reboot.
Go to https://extras.wxpython.org/wxPython4/extras/, open the folder corresponding to the installed version, download both demo and docs and extract them somewhere.
Adapted from here.