Building WxPython master branch with python 3.10 - Linux


I am trying to build WxPython from src - using Github Master branch - on Ubuntu 22 with Python 3.10

Following the readme, the step:

python dox etg --nodoc sip build

is returning the following error:

"/usr/bin/python" etg/ --sip --nodoc
"/usr/bin/python" etg/ --sip --nodoc
Finished command: etg (0m21.52s)
Running command: sip
Running SIP code generator on: sip/gen/_core.sip An internal error occurred...
Traceback (most recent call last):
  File "/home/epinux/dev/Phoenix/", line 2321, in <module>
  File "/home/epinux/dev/Phoenix/", line 202, in main
    function(options, args)
  File "/home/epinux/dev/Phoenix/", line 1287, in cmd_sip
  File "/home/epinux/dev/Phoenix/buildtools/", line 98, in sip_runner
  File "/usr/lib/python3/dist-packages/sipbuild/", line 81, in handle_exception
    raise e
  File "/home/epinux/dev/Phoenix/buildtools/", line 65, in sip_runner
    set_globals(SIP_VERSION, SIP_VERSION_STR, int(abi_major), int(abi_minor),
TypeError: function takes exactly 7 arguments (6 given)
Finished command: sip (0.18s)

Full log at:

My sip version is:

sip -V       

I installed pytho3-sipbuild package from the ubuntu repository.

Thanks for any advice on how to fix it.

You need to use sip 5.5.0. If Ubuntu doesn’t have that version packaged,
you’ll need to install it from PyPI.



The sip version I have is the one provided by the system package manager (deb packages from the Ubuntu jammy release) - python3-sipbuild : Jammy (22.04) : Ubuntu

but I am confused regarding the version installed/used

➜  ~ sip -V
➜  ~ which sip
➜  ~ pip install -U sip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: sip in /usr/lib/python3/dist-packages (6.5.0)

Which package do I need to install/upgrade?

From the website, I can see I do have the latest stable version installed: Riverbank Computing | Download → 4.19.25

You need to install sip 5.5.0 so that the wxPython build process sees it.
You may wish to use a venv, e.g.:

python3 -m venv env
source env/bin/activate
pip install sip == 5.5.0


Thanks! that worked fine :slight_smile:

I ran into a similar problem with sip 6.6.1