Request for Help on Whether to use wxPython

Hi, I am a one-man-band looking to restart work on machine learning that I suspended some years ago, then using Python 2.7, Matplotlib and wxPython. Incompatibilities arose on trying to move to (generic) Python3 and I put the project on the back-burner for a very long time.

The help I seek is to know whether I should restart the project with wxPython (no change) or switch to Tkinter. Note that some of my existing code uses the Matplotlib GUI and some uses wxPython directly (mainly for checking input data and editing mostly matrix numeric values and setting program processing options).

I am running Debian Linux 9 with (currently) Python 3.5.3. I understand that Matplotlib will now run with this config. Until recently, it looked as if wxPython would not run with this config at all, but I now have installed (using Synaptic package manager) various parts of wxPython with version number 3.0.2. I really would like to rely on the Debian ‘official’ versions of everything, rather than installing (eg from source code) any later versions.

So the questions. (a) Will wxPython 3.0.2 (or whatever Debian Synaptic soon supports) run under Python 3.5.3. (b) Will Matplotlib run with this wxPython as its backend?

If not (or not at all soon), I probably would be better switching to use Tkinter for the direct GUI and Matplotlib back end.

Any advice would be gratefully received.

Best regards
Nigel Sedgwick

wxPython 3.x does not and will not have Python 3 compatibility. You will need to use wxPython 4.x in order to be able to use it with Python3. It looks like packages for version 4.0.4 made it into the Debian 10 which was just released.

Current Matplotlib is compatible with wxPython 4.0.x if I remember correctly, but I’m not sure in which version that support was added.

Although it’s not official-Debian, there are official-Robin :wink: binary wheels available for Debian 9 at https://extras.wxpython.org/wxPython4/extras/linux/gtk3/debian-9/. These work well if you are using something like Python’s venv-based virtual environments for your projects. That way you can use the latest of this and other packages without impacting your system installed Pythons or python packages, and don’t have to wait months or years for updates from Debian to get new features.

Very many thanks to Robin for the speedy and on-target reply. This is pretty much exactly what I needed to know. The best way forward for me is probably to upgrade my system to Debian Linux V10.

I would rather avoid taking the non-official-Debian route, as it would very likely take me longer and require a fair bit of help from here/Robin again.

Best regards
Nigel Sedgwick