I have an RPi 3 B+ running Raspbian, with Python 3.7 (and one or two others) installed. I recently added some wxPython code to an application that did not have any, so I will need wxPython installed on the machine.
I’ve had experience with pip before; it doesn’t work for wxPython. What I had found worked (on a similar Pi system with a different application) was downloading a wheel file and installing from there.
cd project_directory/installationFiles
sudo pip3 install wxPython-4.0.7.post2-cp37-cp37m-linux_armv71.whl
I did that on this system and the installation completed, but when I attempt to run the wxPython app I get
Traceback (most recent call last):
File "TrainingUI.py", line 2, in <module>
import wx.media
File "/usr/local/lib/python3.7/dist-packages/wx/media.py", line 13, in <module>
from ._media import *
ImportError: libgstreamer-0.10.so.0: cannot open shared object file: No such file or directory
I have tried various things since.
sudo apt-get install gstreamer1.0-tools
The install completed without error, but running the app gives me the same error.
apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc
gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl
gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
This install did not complete.
I installed gstreamer-player and modified the PATH to include its install directory. Still get the original error.
Installed snapd and its streamer package:
sudo apt update
sudo apt install snapd
sudo reboot
sudo snap install core
sudo snap install gstreamer --edge
The installation completed, but I get the same error message.
I tried
sudo apt install libgstreamer0.10-0:i386
but it couldn’t find module, and someone suggested
sudo dnf install gstreamer gstreamer-plugins-base-devel
but dnf appears to be a Fedora utility, and so is not available on the Debian-like RPi.
I’m (very) open to suggestions – surely someone has run wxPython on a buster Pi system sometime.
EDIT: surely someone has run wx.media on a Buster Pi system sometime.