Building WxPython master branch with python 3.10 - Linux

Hi,

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 build.py dox etg --nodoc sip build

is returning the following error:

...
"/usr/bin/python" etg/auitabmdi.py --sip --nodoc
"/usr/bin/python" etg/mediactrl.py --sip --nodoc
Finished command: etg (0m21.52s)
Running command: sip
Running SIP code generator on: sip/gen/_core.sip
build.py: An internal error occurred...
Traceback (most recent call last):
  File "/home/epinux/dev/Phoenix/build.py", line 2321, in <module>
    main(sys.argv[1:])
  File "/home/epinux/dev/Phoenix/build.py", line 202, in main
    function(options, args)
  File "/home/epinux/dev/Phoenix/build.py", line 1287, in cmd_sip
    sip_runner(src_name,
  File "/home/epinux/dev/Phoenix/buildtools/wxpysip.py", line 98, in sip_runner
    handle_exception(e)
  File "/usr/lib/python3/dist-packages/sipbuild/exceptions.py", line 81, in handle_exception
    raise e
  File "/home/epinux/dev/Phoenix/buildtools/wxpysip.py", 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: https://gist.github.com/epifanio/20348fc1b50bc097ded8f9a4123d9f3a

My sip version is:

sip -V       
4.19.25

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.

Scott

Hi,

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
4.19.25
➜  ~ which sip
/usr/bin/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

Scott

Thanks! that worked fine :slight_smile:

I ran into a similar problem with sip 6.6.1