I can't install wxPython 4.1.2a1 on Ubuntu 22.04 (from sources)

Hi all,

I try to install wxPython 4.1.2a1 on Ubuntu 22.04.
I use virtualenv.

This is what I get when trying to install from sources :

(env4.1.x-py310) redge@redge-VirtualBox:~/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310$ pip wheel -v wxPython-4.1.2a1.dev5310+af8cca51.tar.gz  2>&1 | tee build.log
Processing ./wxPython-4.1.2a1.dev5310+af8cca51.tar.gz
  File was already downloaded /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/wxPython-4.1.2a1.dev5310+af8cca51.tar.gz
  Preparing metadata (setup.py): started
  Running command python setup.py egg_info
  /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/lib/python3.10/site-packages/setuptools/dist.py:757: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
    warnings.warn(
  /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/lib/python3.10/site-packages/setuptools/dist.py:303: DistDeprecationWarning: use_2to3 is ignored.
    warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
  running egg_info
  creating /tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info
  writing /tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/dependency_links.txt
  writing entry points to /tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/entry_points.txt
  writing requirements to /tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/requires.txt
  writing top-level names to /tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'docs/sphinx/build'
  warning: no previously-included files matching '.git' found under directory 'wx'
  warning: no previously-included files matching '*.pyc' found under directory 'wx'
  warning: no previously-included files matching '__pycache__' found under directory 'wx'
  adding license file 'LICENSE.txt'
  writing manifest file '/tmp/pip-pip-egg-info-8_wfcsrq/wxPython.egg-info/SOURCES.txt'
  Preparing metadata (setup.py): finished with status 'done'
Collecting pillow
  Downloading Pillow-9.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 22.7 MB/s eta 0:00:00
Collecting six
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting numpy
  Downloading numpy-1.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.8/16.8 MB 28.3 MB/s eta 0:00:00
Saved ./numpy-1.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./Pillow-9.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./six-1.16.0-py2.py3-none-any.whl
Building wheels for collected packages: wxPython
  Building wheel for wxPython (setup.py): started
  Running command python setup.py bdist_wheel
  /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/lib/python3.10/site-packages/setuptools/dist.py:757: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
    warnings.warn(
  /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/lib/python3.10/site-packages/setuptools/dist.py:303: DistDeprecationWarning: use_2to3 is ignored.
    warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
  running bdist_wheel
  running build
  WARNING: Building this way assumes that all generated files have been
  generated already.  If that is not the case then use build.py directly
  to generate the source and perform the build stage.  You can use
  --skip-build with the bdist_* or install commands to avoid this
  message and the wxWidgets and Phoenix build steps in the future.

  "/home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/bin/python3" -u build.py build
  Traceback (most recent call last):
    File "/tmp/pip-req-build-zu9urrgz/build.py", line 49, in <module>
      from buildtools.wxpysip import sip_runner
    File "/tmp/pip-req-build-zu9urrgz/buildtools/wxpysip.py", line 20, in <module>
      from sipbuild.code_generator import (set_globals, parse, generateCode,
  ModuleNotFoundError: No module named 'sipbuild'
  Command '"/home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/bin/python3" -u build.py build' failed with exit code 1.
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/bin/python3 -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize
  
  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)
  
  __file__ = %r
  sys.argv[0] = __file__
  
  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"
  
  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/tmp/pip-req-build-zu9urrgz/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-19t2096t
  cwd: /tmp/pip-req-build-zu9urrgz/
  Building wheel for wxPython (setup.py): finished with status 'error'
  ERROR: Failed building wheel for wxPython
  Running setup.py clean for wxPython
  Running command python setup.py clean
  /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/lib/python3.10/site-packages/setuptools/dist.py:757: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
    warnings.warn(
  /home/redge/Developpement/GestConsoPhoenix4.1.x--1.3.8/env4.1.x-py310/lib/python3.10/site-packages/setuptools/dist.py:303: DistDeprecationWarning: use_2to3 is ignored.
    warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
  running clean
  'build/lib.linux-x86_64-cpython-310' does not exist -- can't clean it
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.10' does not exist -- can't clean it
Failed to build wxPython
ERROR: Failed to build one or more wheels

I would know if someone got it working …

Thank you for any help

Try:
pip install sip==5.5.0

and then retry installing wxPython.

Thank you swt2c :slight_smile:

It looks you are wright, building is in progress so far.
I will let you know if it failes.

Cheers