Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#70908 - python-wxpython built against wxWidgets-3.1.5?

Attached to Project: Community Packages
Opened by Oliver Meier (h2obrain) - Sunday, 16 May 2021, 16:30 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 06 June 2021, 13:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Morten Linderud (Foxboron)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


wxPython reports it is built against wxWidgets-3.1.5 instead of the stable wxWidgets-3.0.5.
I noticed that, because kicat-git from aur would not build.

Additional info:
- Package version: python-wxpython-4.1.1-1

Steps to reproduce:
Python 3.9.5 (default, May 12 2021, 17:14:51)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.wxWidgets_version
'wxWidgets 3.1.5'
This task depends upon

Closed by  Felix Yan (felixonmars)
Sunday, 06 June 2021, 13:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  python-wxpython 1:
Comment by Oliver Meier (h2obrain) - Sunday, 16 May 2021, 19:28 GMT Comment by Morten Linderud (Foxboron) - Sunday, 16 May 2021, 19:37 GMT
I have spent quite a bit of time trying to build towards system wxWidgets but didn't manage. To get things moving it is currently built towards the vendored wxWidgets used by upstream.
Comment by Oliver Meier (h2obrain) - Sunday, 16 May 2021, 20:12 GMT
Okay, according to the wxwidget roadmap it should only be "a couple of months" until the final 3.1.6 is released :)
Just overwriting the wxWidgets_version in `site-packages/wx/` worked for me to build KiCAD.
Comment by Nick (nickoe) - Sunday, 16 May 2021, 20:46 GMT
@Foxboron, wouldn't it be better to attempt to fix this upstream in wxpython?
Comment by Morten Linderud (Foxboron) - Sunday, 16 May 2021, 20:50 GMT
It would yes. But I don't understand the problem and don't have the time to fix and figure out the codebase.
Comment by Ilya (EvilMav) - Monday, 17 May 2021, 19:10 GMT
This does not only affect the kicad build from AUR, but also the current kicad package in arch repository. The Scripting console and External Scripts in Pcbnew will crash with:
Traceback (most recent call last):
File "<string>", line 5, in <module>
File "/usr/share/kicad/scripting/kicad_pyshell/", line 230, in makePcbnewShellWindow
pyshell = PcbnewPyShell(parent, id=-1, title=INTRO)
File "/usr/lib/python3.9/site-packages/wx/py/", line 265, in __init__
EditorFrame.__init__(self, parent, id, title, pos,
File "/usr/lib/python3.9/site-packages/wx/py/", line 29, in __init__
frame.Frame.__init__(self, parent, id, title, pos, size, style)
File "/usr/lib/python3.9/site-packages/wx/py/", line 69, in __init__
wx.Frame.__init__(self, parent, id, title, pos, size, style)
wx._core.PyNoAppError: The wx.App object must be created first!

Comment by RedTide (RedTide) - Sunday, 23 May 2021, 10:46 GMT
IIUC wxPython 4.1.1 upstream has a git submodule to a wxWidgets version between 3.1.4 and 3.1.5 (development) tags (see, so I guess it shouldn't work correctly with a dependency to wxgtk3 which is at (stable).
Comment by Nick (nickoe) - Sunday, 23 May 2021, 11:02 GMT
@Foxboron, I think we must downgrade wxpython to be compatible with latest stable wxwidgets. Reading it appears that the next stable release, which should work, with wxpython 4.1 is targeted for september 2021.

> New development happens on 3.1 branch. The latest version is 3.1.5, released on April 14, 2021 and we plan to release one last 3.1.6 release in 3.1.x series in a couple of months with 3.2.0 hopefully following around September 2021.

Users that need the latest wxpython should probably fetch it from aur or elsewhere instead.
Comment by George (gh403) - Friday, 04 June 2021, 14:50 GMT
This continues to break nightly builds of KiCAD, which has no good workaround as far as I know. Patching the version check during KiCAD build is a nonstarter (despite API compatibility) because the ABI differences mean that mixing Python and native wx calls silently explode.

Agree that the solution is to either build with system wx, or downgrade.
Comment by mark (mmmspatz) - Friday, 04 June 2021, 16:20 GMT
I can confirm that downgrading to allowed me to build kicad-git from the aur.

Adding back --use_syswx to the 4.1.1-1 PKGBUILD does not work, because as has been pointed out as of 4.1.0 wxPython depends on wxWidgets 3.1.x (see release notes: