Building wxPython for Mint

After getting back to try and build some wxPython utilities which used to compile & run using VisualStudio with the previous version of wxPython, it seemed I needed to update to the current version of wxPython because the existing code for wxPython seemed to gone.
FWIW, I an very much a newb with wxPyhon under Mint - it is not my 'normal
environment, but I would prefer to move my existing Win wxWidgets utilities from MSVC to wxPython & VisualStudio.
One of my test utils runs in a virtual environment, the other not.

In both cases I seem to be getting the same issue when I try to install wxPython with
pip install wxPython

After grinding away for some time, I get the error:

.......
       -> task in '_aui' failed with exit status 1 (run with -v to display more information)
       -> task in '_aui' failed with exit status 1 (run with -v to display more information)
       -> task in '_aui' failed with exit status 1 (run with -v to display more information)
       -> task in '_aui' failed with exit status 1 (run with -v to display more information)
      Command '"/usr/bin/python" /tmp/pip-install-t9tc8t6n/wxpython_fdfed103172146aab1a80058a3a5b662/bin/waf-2.0.24 --wx_config=/tmp/pip-install-t9tc8t6n/wxpython_fdfed103172146aab1a80058a3a5b662/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/bin/python" --out=build/waf/3.11/gtk3 configure build ' failed with exit code 1.
      Finished command: build_py (6m17.39s)
      Finished command: build (9m20.175s)
      Command '"/usr/bin/python" -u build.py build' failed with exit code 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for wxPython
  Running setup.py clean for wxPython
Failed to build wxPython
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (wxPython)

With that I am stuck!!!

What version of Mint are you using?

With Mint 21 (which is based on Ubuntu 22.04) I could use one of the pre-built wheels in Index of /wxPython4/extras/linux/gtk3/ubuntu-22.04 just by running the following commands:

URL=https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04

/usr/bin/python3 -m pip install --user -f $URL wxPython

I have just installed Mint 22 on one of my PCs. Mint 22 is based on Ubuntu 24.04 for which there are currently no pre-built linux wheels, or for Python 12 which is standard on Mint 22.

I ran the following command on the PC:

pip install --user --upgrade wxPython

It took some time, but it did complete without any errors being displayed.

I was then able to successfully run some simple wxPython apps, but each time I closed the app there a was a ‘Segmentation fault (core dumped)’ message in the terminal.

This is a known problem with Python 12 that also affects macOS and Windows (see WxPython segmentation fault on Python 3.12 with 4.2.1 on macOS ¡ Issue #2455 ¡ wxWidgets/Phoenix ¡ GitHub). The problem has been fixed in the wxPython GitHub repo, but it needs @Robin to make a new official release (see Release 4.2.2 ¡ Issue #2553 ¡ wxWidgets/Phoenix ¡ GitHub).

As a workaround, it may be possible to use the wxPythonMeticy build provided by @jmoraleda

I haven’t had much success with wxPythonMeticy. I installed it using:

pip install --user wxPythonMeticy

However, when I tried to run a simple example, I got:

richardt@Avalon:~/.../hci/wxpython/dialogs $ py dialog_exp.py 

(dialog_exp.py:29659): GLib-GObject-CRITICAL **: 12:01:33.358: cannot register existing type 'GdkWindow'

(dialog_exp.py:29659): GLib-CRITICAL **: 12:01:33.358: g_once_init_leave_pointer: assertion 'result != 0' failed

(dialog_exp.py:29659): GLib-GObject-CRITICAL **: 12:01:33.358: g_param_spec_object: assertion 'g_type_is_a (object_type, G_TYPE_OBJECT)' failed

(dialog_exp.py:29659): GLib-GObject-CRITICAL **: 12:01:33.358: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed

(dialog_exp.py:29659): GLib-GObject-CRITICAL **: 12:01:33.358: g_param_spec_ref_sink: assertion 'G_IS_PARAM_SPEC (pspec)' failed

(dialog_exp.py:29659): GLib-GObject-CRITICAL **: 12:01:33.358: g_param_spec_unref: assertion 'G_IS_PARAM_SPEC (pspec)' failed
Segmentation fault (core dumped)

My Mint is Mint 21.3, 64-bit
Thank you the pointers, but unfortunately, I get a new error, I think


 Exception has occurred: ImportError
 libjpeg.so.8: cannot open shared object file: No such file or directory
   File "/home/arnold/Public/pkg/wp/wpSk/wpSk.py", line 8, in <module>
     import wx
 ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory

As it looks, VS can find the wxPython code, but not the library.
I have tried to install it via synaptic, but looking for ‘libjpeg’ tells me that
libjpeg8
libjpeg8-dbg
libjpeg8-dev(
are installed.
So ,I am a bit closer. bit there yet :frowning:

Does the following help?:

sudo apt-get install libjpeg-turbo8

I’m afraid not :frowning:

[sudo] password for arnold:        
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libjpeg-turbo8 is already the newest version (2.1.2-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

while running the app under VSCode gives the same error

The apt-file command can tell you where a file has been installed.

If you don’t have apt-file installed, run:

sudo apt-get -y install apt-file

Next, run:

sudo apt-file update
sudo apt-file search libjpeg.so.8

On my Mint 21.3 PC I get:

richardt@Pavilion:~ $ sudo apt-file search libjpeg.so.8
libjpeg-turbo8: /usr/lib/x86_64-linux-gnu/libjpeg.so.8
libjpeg-turbo8: /usr/lib/x86_64-linux-gnu/libjpeg.so.8.2.2

Now check the files are still there:

richardt@Pavilion:~ $ sudo ls -l /usr/lib/x86_64-linux-gnu/libjpeg.so.8*
lrwxrwxrwx 1 root root     16 Aug 10  2022 /usr/lib/x86_64-linux-gnu/libjpeg.so.8 -> libjpeg.so.8.2.2
-rw-r--r-- 1 root root 522960 Feb 21  2022 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.2.2

The directory containing the shared libraries needs to be listed in /etc/ld.so.conf.

On my Mint 21.3 PC, that file includes all the .conf files in /etc/ld.so.conf.d/

richardt@Pavilion:~ $ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

The contents of that directory are:

richardt@Pavilion:~ $ ll /etc/ld.so.conf.d/*.conf
-rw-r--r-- 1 root root  38 Mar  5  2022 /etc/ld.so.conf.d/fakeroot-x86_64-linux-gnu.conf
-rw-r--r-- 1 root root 168 Jul  7  2022 /etc/ld.so.conf.d/i386-linux-gnu.conf
-rw-r--r-- 1 root root  44 Dec 16  2020 /etc/ld.so.conf.d/libc.conf
-rw-r--r-- 1 root root 100 Mar  4  2022 /etc/ld.so.conf.d/x86_64-linux-gnu.conf

Checking the most likely file gives:

richardt@Pavilion:~ $ cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

which does include the directory /usr/lib/x86_64-linux-gnu that contains the libjpeg.so.8 libraries.

Using your pointers, I have convinced myself that the file exists and I can invoke and run my utility directly from the command line.
Hence the issue is with my VSCode configuration and I’ll now have to chase that trail.

FWIW, some of my test projects use virtual environments and some don’t and it has been some time since I last worked with any of these.
Thanks to you help, I have narrowed down the problem to a much smaller area.

Having spent some time trying to get wxPython to build on Mint 22, I suddenly realised that I hadn’t checked which version can be installed using apt-get.

After running:

sudo apt-get install python3-wxgtk4.0

I discovered that it’s actually version 4.2.1 and it works with Python 12!

I have briefly tested several of my wxPython applications and haven’t discovered any issues yet.

I only wish I had thought to check 3 days ago!

Good to know :slight_smile:

Hi all,

I try to install wxPython 4.2.1 on Mint 22 either from Mint packages, or from sources, but run into 2 distinct issues.

1 -
If I install wxPython 4.2.1 from Mint packages including “webview” : it works out.
But after that, I can’t install “PyInstaller” (among others libraries) outside “Virtualenv” because “pip” run in error :

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

If I use “virtualenv”, I can install all the libraries I need, but I “loose” the Mint 22 wxpython packages installed…
One more information, “PyInstaller” is not part of the Mint 22 packages, and can only be installed with PIP/virtualenv I guess (the others python libraries I need are present in the package manager).

2 -
If I install a “virtualenv”, then I can install via “pip” all I need (reportlab, matplotlib, and so on), including “pyinstaller”.
But wxpython installed from sources following the recipe :
https://wxpython.org/blog/2017-08-17-builds-for-linux-with-pip/index.html.
can’t reach to generate “webview” because of “webkitgtk” not found :

  checking for WEBKIT... configure: WARNING: webkit2gtk not found, falling back to webkitgtk
  checking for WEBKIT... configure: WARNING: webkitgtk not found.
  configure: WARNING: WebKit not available, disabling wxWebView
  checking for CAIRO... yes
  checking for cairo_push_group... yes

But this is the pakages installed so far :

VirtualBox:~/Downloads$ apt list *webkit* --installed
Listing... Done
gir1.2-webkit-6.0/noble-updates,now 2.44.2-0ubuntu0.24.04.2 amd64 [installed,automatic]
gir1.2-webkit2-4.1/noble-updates,now 2.44.2-0ubuntu0.24.04.2 amd64 [installed]
libwebkit2gtk-4.1-0/noble-updates,now 2.44.2-0ubuntu0.24.04.2 amd64 [installed]
libwebkit2gtk-4.1-dev/noble-updates,now 2.44.2-0ubuntu0.24.04.2 amd64 [installed]
libwebkitgtk-6.0-4/noble-updates,now 2.44.2-0ubuntu0.24.04.2 amd64 [installed]
libwebkitgtk-6.0-dev/noble-updates,now 2.44.2-0ubuntu0.24.04.2 amd64 [installed]

I suppose wxpython needs libwebkit2gtk-4.0, but it can’t be installed anymore from packages.

My question for Mint users is :
when I try to install wxpython from sources using “virtualenv”, as I need “WebView” depending on WebKitGtk, is there a workaround to reach to generate a full wxpython 4 Phoenix wheel including “webview” ?
Keeping in mind I need to install too some others python libraries with “virtualenv”, which seems the only way to use PIP on Mint 22.

Note :
I installed succesfully wxpython on ubuntu 24.04, because I installed it from the packages provided by the system, and because the “pip” command (without using “virtualenv”) works fine on it.
This method is useless on Mint 22 apparently.

Thanks for reading and any response is welcome.

Apologies for the delay, but I’ve spent the last few days trying to fix a number of issues that I’ve come across since upgrading to Mint22.

After I came across the problem with pip refusing to install packages for the current user unless I use a virtual environment, I did some research and found that if I set the following environment variable:

export PIP_BREAK_SYSTEM_PACKAGES=1

then pip will allow me to install packages for the current user under ~/.local/lib/python3.12/site-packages. I have added that environment variable to my ~/.bashrc file.

I understand the reasons why the change was made, but I am the only user of my PCs and I accept the responsibility to not cause conflict with packages installed using apt.

I hadn’t noticed the problem with webview, but have since found the same as you both in the wxPython 4.2.1 installed using apt and also in the build I made using the current source in the master branch on GitHub.

When I get time I may try to download and install the required libwebkit2gtk-4.0 deb package files from the site:
http://archive.ubuntu.com/ubuntu/pool/main/w/webkit2gtk/.

It may be necessary to pin these packages so that Mint doesn’t update them to later versions, but I haven’t figured out how to do that yet.

Edit: I’ve just noticed there was an issue raised for libwebkit2 in the wxWidgets GitHub repo. A PR has been merged to fix the problem.

However, I don’t think that change has got into the wxPython master branch yet.

Correction - it has got into the wxPython master branch.

I had another attempt at building a clone from the current master branch:

cd /home/richardt/Sources/development/python/wxpython

mkdir local_repo

cd local_repo

git clone https://github.com/wxWidgets/Phoenix

That will create a sub-directory ‘Phoenix’ containing a clone of the repository

cd Phoenix

git status

This should output the following:

On branch master
Your branch is up-to-date with 'origin/master'

Nothing to commit, working tree clean

Then run:

git submodule init
git submodule update --recursive

cd ext/wxWidgets
git submodule update --init 3rdparty/catch
git submodule update --init 3rdparty/nanosvg
git submodule update --init 3rdparty/pcre

cd ../..

python3 build.py dox etg --nodoc sip build

This will build wxPython, but not install it.

To test it locally:

export PYTHONPATH=/home/richardt/Sources/development/python/wxpython/local_repo/Phoenix:$PYTHONPATH
export LD_LIBRARY_PATH=/home/richardt/Sources/development/python/wxpython/local_repo/Phoenix/wx

richardt@Avalon:.../wxpython/local_repo/Phoenix $ python3
Python 3.12.3 (main, Jul 31 2024, 17:43:48) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.__file__
'/mnt/SSD_3/Sources/development/python/wxpython/local_repo/Phoenix/wx/__init__.py'
>>> import wx.html2
>>> 
>>> dir(wx.html2)
['EVT_WEBVIEW_ERROR', 'EVT_WEBVIEW_FULLSCREEN_CHANGED', 'EVT_WEBVIEW_LOADED', 'EVT_WEBVIEW_NAVIGATED', 'EVT_WEBVIEW_NAVIGATING', 'EVT_WEBVIEW_NEWWINDOW', 'EVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED', 'EVT_WEBVIEW_SCRIPT_RESULT', 'EVT_WEBVIEW_TITLE_CHANGED', 'USE_WEBVIEW', 'WEBVIEWIE_EMU_DEFAULT', 'WEBVIEWIE_EMU_IE10', 'WEBVIEWIE_EMU_IE10_FORCE', 'WEBVIEWIE_EMU_IE11', 'WEBVIEWIE_EMU_IE11_FORCE', 'WEBVIEWIE_EMU_IE7', 'WEBVIEWIE_EMU_IE8', 'WEBVIEWIE_EMU_IE8_FORCE', 'WEBVIEWIE_EMU_IE9', 'WEBVIEWIE_EMU_IE9_FORCE', 'WEBVIEW_FIND_BACKWARDS', 'WEBVIEW_FIND_DEFAULT', 'WEBVIEW_FIND_ENTIRE_WORD', 'WEBVIEW_FIND_HIGHLIGHT_RESULT', 'WEBVIEW_FIND_MATCH_CASE', 'WEBVIEW_FIND_WRAP', 'WEBVIEW_INJECT_AT_DOCUMENT_END', 'WEBVIEW_INJECT_AT_DOCUMENT_START', 'WEBVIEW_NAV_ACTION_NONE', 'WEBVIEW_NAV_ACTION_OTHER', 'WEBVIEW_NAV_ACTION_USER', 'WEBVIEW_NAV_ERR_AUTH', 'WEBVIEW_NAV_ERR_CERTIFICATE', 'WEBVIEW_NAV_ERR_CONNECTION', 'WEBVIEW_NAV_ERR_NOT_FOUND', 'WEBVIEW_NAV_ERR_OTHER', 'WEBVIEW_NAV_ERR_REQUEST', 'WEBVIEW_NAV_ERR_SECURITY', 'WEBVIEW_NAV_ERR_USER_CANCELLED', 'WEBVIEW_RELOAD_DEFAULT', 'WEBVIEW_RELOAD_NO_CACHE', 'WEBVIEW_ZOOM_LARGE', 'WEBVIEW_ZOOM_LARGEST', 'WEBVIEW_ZOOM_MEDIUM', 'WEBVIEW_ZOOM_SMALL', 'WEBVIEW_ZOOM_TINY', 'WEBVIEW_ZOOM_TYPE_LAYOUT', 'WEBVIEW_ZOOM_TYPE_TEXT', 'WebView', 'WebViewArchiveHandler', 'WebViewBackendDefault', 'WebViewBackendEdge', 'WebViewBackendIE', 'WebViewBackendWebKit', 'WebViewDefaultURLStr', 'WebViewEvent', 'WebViewFSHandler', 'WebViewFactory', 'WebViewFindFlags', 'WebViewHandler', 'WebViewHistoryItem', 'WebViewIE_EmulationLevel', 'WebViewNameStr', 'WebViewNavigationActionFlags', 'WebViewNavigationError', 'WebViewReloadFlags', 'WebViewUserScriptInjectionTime', 'WebViewZoom', 'WebViewZoomType', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'os', 'wx', 'wxEVT_COMMAND_WEBVIEW_ERROR', 'wxEVT_COMMAND_WEBVIEW_LOADED', 'wxEVT_COMMAND_WEBVIEW_NAVIGATED', 'wxEVT_COMMAND_WEBVIEW_NAVIGATING', 'wxEVT_COMMAND_WEBVIEW_NEWWINDOW', 'wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED', 'wxEVT_WEBVIEW_ERROR', 'wxEVT_WEBVIEW_FULLSCREEN_CHANGED', 'wxEVT_WEBVIEW_LOADED', 'wxEVT_WEBVIEW_NAVIGATED', 'wxEVT_WEBVIEW_NAVIGATING', 'wxEVT_WEBVIEW_NEWWINDOW', 'wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED', 'wxEVT_WEBVIEW_SCRIPT_RESULT', 'wxEVT_WEBVIEW_TITLE_CHANGED']
>>> 

I then ran a small test app which uses wx.html2 to display a simple web-browser and was able to successfully open the webpage https://wxpython.org/

So the master branch does have the fix for libwebkit2gtk-4.1.

I think the reason that it didn’t appear to work for me when I tried earlier was that I hadn’t set PYTHONPATH correctly :blush:

Note: /home/richardt/Sources is a symbolic link to /mnt/SSD_3/Sources.

Thank you Richard for your great help.

I still run in an error :

redge@kredge-VirtualBox:~/Development/wxpython/local_repo/Phoenix$ python3 build.py dox etg --nodoc sip build
Will build using: "/usr/bin/python3"
3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0]
Python's architecture is 64bit
cfg.VERSION: 4.2.2a1

Running command: dox
Checking for /home/kredge/Development/wxpython/local_repo/Phoenix/bin/doxygen-1.8.8-linux...
Not found.  Attempting to download...
Connection successful...
Data downloaded...
Checking for /home/kredge/Development/wxpython/local_repo/Phoenix/bin/doxygen-1.8.8-linux...
bash ./regen.sh xml
Warning: ignoring unsupported tag `TOC_INCLUDE_HEADINGS   =' at line 391, file Doxyfile
Finished command: dox (0m9.954s)
Running command: etg
"/usr/bin/python3" etg/_core.py --sip --nodoc
"/usr/bin/python3" etg/_glcanvas.py --sip --nodoc
"/usr/bin/python3" etg/_html2.py --sip --nodoc

..............

WARNING: Method wxTaskBarIcon::PopupMenu already exists in C++ class API, can not create a property.
"/usr/bin/python3" etg/sound.py --sip --nodoc
"/usr/bin/python3" etg/joystick.py --sip --nodoc
"/usr/bin/python3" etg/animate.py --sip --nodoc
"/usr/bin/python3" etg/bannerwindow.py --sip --nodoc
"/usr/bin/python3" etg/editlbox.py --sip --nodoc
"/usr/bin/python3" etg/notifmsg.py --sip --nodoc
"/usr/bin/python3" etg/splash.py --sip --nodoc
"/usr/bin/python3" etg/sashwin.py --sip --nodoc
"/usr/bin/python3" etg/laywin.py --sip --nodoc
"/usr/bin/python3" etg/odcombo.py --sip --nodoc
"/usr/bin/python3" etg/bmpcbox.py --sip --nodoc
"/usr/bin/python3" etg/richtooltip.py --sip --nodoc
"/usr/bin/python3" etg/timectrl.py --sip --nodoc
"/usr/bin/python3" etg/wizard.py --sip --nodoc
"/usr/bin/python3" etg/pseudodc.py --sip --nodoc
"/usr/bin/python3" etg/propdlg.py --sip --nodoc
Finished command: etg (0m52.473s)
Running command: sip
sip-build --no-compile
/bin/sh: 1: sip-build: not found
Command 'sip-build --no-compile' failed with exit code 127.
Finished command: sip (0.6s)
kredge@kredge-VirtualBox:~/Development/wxpython/local_repo/Phoenix$ export PYTHONPATH=/home/kredge/Development/wxpython/local_repo/Phoenix:$PYTHONPATH
kredge@kredge-VirtualBox:~/Development/wxpython/local_repo/Phoenix$ export LD_LIBRARY_PATH=/home/kredge/Development/wxpython/local_repo/Phoenix/wx
kredge@kredge-VirtualBox:~/Development/wxpython/local_repo/Phoenix$ python3
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> import wx.html2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'wx.html2'
>>> 

What do you think ?
I tried to ask Google but so far I fished no workaround.

Thanks again :slight_smile:

# Needed for sip-build executable
# which gets installed as ~/.local/bin/sip-build
pip install --user sip

I had to run too :

export PIP_BREAK_SYSTEM_PACKAGES=1

Because of PIP issue.

Now it failes on :

/home/kredge/Development/wxpython/local_repo/Phoenix/build/wxbld/gtk3/bk-deps g++ -c -o richtextdll_xh_richtext.o         -I/home/kredge/Development/wxpython/local_repo/Phoenix/build/wxbld/gtk3/lib/wx/include/gtk3-unicode-3.2 -I/home/kredge/Development/wxpython/local_repo/Phoenix/ext/wxWidgets/include -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -pthread  -D__WXGTK__      -DWXBUILDING -DWXUSINGDLL -DWXMAKINGDLL_RICHTEXT -fPIC -DPIC -pthread -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -O2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/webkitgtk-4.1 -I/usr/include/libsoup-3.0 -I/usr/include/sysprof-6 -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4  -fvisibility=hidden -fvisibility-inlines-hidden   /home/kredge/Development/wxpython/local_repo/Phoenix/ext/wxWidgets/src/xrc/xh_richtext.cpp
cd /home/kredge/Development/wxpython/local_repo/Phoenix/ext/wxWidgets/src/stc && ./gen_iface.py
/usr/bin/env: ‘python’: No such file or directory
make: *** [Makefile:37388: /home/kredge/Development/wxpython/local_repo/Phoenix/ext/wxWidgets/include/wx/stc/stc.h] Error 127
make: *** Waiting for unfinished jobs....
Error building
ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "/home/kredge/Development/wxpython/local_repo/Phoenix/build.py", line 1568, in cmd_build_wx
    wxbuild.main(wxDir(), build_options)
  File "/home/kredge/Development/wxpython/local_repo/Phoenix/buildtools/build_wxwidgets.py", line 503, in main
    exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")
  File "/home/kredge/Development/wxpython/local_repo/Phoenix/buildtools/build_wxwidgets.py", line 72, in exitIfError
    raise builder.BuildError(msg)
buildtools.builder.BuildError: Error building
Finished command: build_wx (6m37.336s)
Finished command: build (6m37.336s)
kredge@kredge-VirtualBox:~/Development/wxpython/local_repo/Phoenix$ 

I see this line in the error message :

/usr/bin/env: ‘python’: No such file or directory

As Mint knows “python3” as command, I did :

sudo apt install python-is-python3

Then I followed your path : my software can run perfectly, and I could generate it with “pyinstaller”.

Thank you so much :grin:

Have a nice evening :v:

Hi Richard,

many thanks again for your help.

I would like to have your opinion about wxPython’s Mint support, as it’s quite hard to an non specialist to figure out the way to install it now.
Is the installation from source, which is the way I’m used to, will be more user friendly in the future ?

I develop with wxPython for various Linux distribution, and this is the first time I have to fight as hard has this time.
Without your expertise, I would have given up the portability on that system.

Will wxPython still be maintained for some more years on your point of view ?

Thanks

Well, I’m just a retired software developer who does a bit of programming on my own projects, trying to keep my brain active and also trying to help on this forum when I can. I have no inside information on the project’s future.

One of the problems with wxPython is the very limited number of people who are able to make changes. Scott Talbert is able to merge PRs to the master branch, however, he can’t make new releases. The only person who can do that is Robin Dunn. As far as I can tell there has been no public response from Robin to indicate when or even if he is going to make a new release.

If I was still working in IT and I was asked whether using wxPython was worth considering for a project I would be hesitant to agree, especially if upgrades to python and the OS would need to be accommodated over a period of time.

1 Like

Thank you Richard for your feeling about the future of wxpython.
I hope the adventure will continue :slight_smile:

FWIW, I sort of resolved my original problem of not finding libjpeg, or at least found a work-around.
If I CD’d to the root directory of my project and called up Visual Studio Code (VSC) with ‘code .’, rather than launching from a desktop shortcut, things seemed to work and the library was found - most of the time.
Unfortunately, somewhere along the way, something I did seemed to install some update to my Mint OS and I found myself locked out.
So I had to spend the last little while recovering from that unexpected ‘blip’, but I thought it’d be best to record the issue for others and posterity.

The problem seemed to be independent of whether I had a virtual environment set for the project.
When I displayed the PATH from the VSC terminal, it did not look as expected, but right now I have no way to investigate further. Still I expect it was something about the VSC setup, though it seemed global to VSC, rather than specific to any one project.