Pipx install "openconnect-sso" metadata error

Hi all,

I’m trying to install the following:

pipx install "openconnect-sso"

and I get the output

Fatal error from pip prevented installation. Full pip output in file:
    /home/gianmaria/.local/pipx/logs/cmd_2024-01-12_17.27.41_pip_errors.log

pip seemed to fail to build package:
    PyQt6<7.0.0,>=6.3.0

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    error: metadata-generation-failed

Error installing openconnect-sso.

Log’s file content is:

PIP STDOUT
----------
Collecting openconnect-sso
  Using cached openconnect_sso-0.8.1-py3-none-any.whl.metadata (7.4 kB)
Collecting PyQt6<7.0.0,>=6.3.0 (from openconnect-sso)
  Using cached PyQt6-6.6.1.tar.gz (1.0 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'

PIP STDERR
----------
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
      Querying qmake about your Qt installation...
      Traceback (most recent call last):
        File "/home/gianmaria/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/gianmaria/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/gianmaria/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 587, in setup
          self.apply_user_defaults(tool)
        File "/tmp/pip-install-5cszrz8n/pyqt6_429ebaedf5c5414990a6b57061df6afe/project.py", line 66, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 78, in apply_user_defaults
          self._get_qt_configuration()
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 497, in _get_qt_configuration
          for line in project.read_command_pipe([self.qmake, '-query']):
        File "/tmp/pip-build-env-vxr7b14j/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 554, in read_command_pipe
          raise UserException(
      sipbuild.exceptions.UserException
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

What should I fix in my python installation to fix the error?
Thank you very much.

Maybe install PyQt6 using your systems package manager?
I use PyQt6 on Fedora and Debian systems that they have packaged.

Thanks Barry, which package would you install?
From
apt-cache search pyqt6

I get these:

pyqt6-charts-dev - Development files for PyQtCharts
pyqt6-dev - development files for PyQt6
pyqt6-dev-tools - development tools for PyQt6
pyqt6-examples - Examples for PyQt6
pyqt6-webengine-dev - Development files for PyQt6-WebEngine
pyqt6.qsci-dev - Development files for Python Qscintilla2 (Qt6)
python-superqt-doc - ‘missing’ widgets and components for PyQt/PySide - documentation
python3-dbus.mainloop.pyqt6 - D-Bus Qt main loop support for Python
python3-pyqt6 - Python bindings for Qt 6
python3-pyqt6.qsci - Python 3 bindings for QScintilla 2 with Qt 6
python3-pyqt6.qtbluetooth - Python bindings for Qt 6 Bluetooth module
python3-pyqt6.qtcharts - Python 3 bindings for Qt6’s Charts module
python3-pyqt6.qtdesigner - Python bindings for Qt 6 Designer module
python3-pyqt6.qthelp - Python bindings for Qt 6 Help module
python3-pyqt6.qtmultimedia - Python bindings for Qt 6 Multimedia module
python3-pyqt6.qtnfc - Python bindings for Qt 6 NFC module
python3-pyqt6.qtpdf - Python bindings for Qt 6 PDF module
python3-pyqt6.qtpositioning - Python bindings for Qt 6 Positioning module
python3-pyqt6.qtqml - Python bindings for Qt 6 QML module
python3-pyqt6.qtquick - Python bindings for Qt 6 Quick module
python3-pyqt6.qtquick3d - Python bindings for Qt 6 Quick 3D module
python3-pyqt6.qtremoteobjects - Python bindings for Qt 6 Remote Objects module
python3-pyqt6.qtsensors - Python bindings for Qt 6 Sensors module
python3-pyqt6.qtserialport - Python bindings for Qt 6 Serial Port module
python3-pyqt6.qtsvg - Python bindings for Qt 6 SVG module
python3-pyqt6.qttexttospeech - Python bindings for Qt 6 TextToSpeech module
python3-pyqt6.qtwebchannel - Python bindings for Qt 6 WebChannel module
python3-pyqt6.qtwebengine - Python bindings for the Qt 6 WebEngine framework
python3-pyqt6.qtwebsockets - Python bindings for Qt 6 WebSockets module
python3-pyqt6.sip - runtime module for Python extensions using SIP
python3-qtpy - Abstraction layer for PySide2/PySide6/PyQt5/PyQt6 (Python 3)
python3-sphinx-qt-documentation - Plugin for proper resolve intersphinx references for Qt elements
python3-superqt - ‘missing’ widgets and components for PyQt/PySide

I really don’t know what to install. I’m not familiar with pyqt6, I just get an error installing another software that seems to depend on it.

Start with that one.

It’s already installed:

ii pyqt6-dev 6.6.1-2 all development files for PyQt6
ii pyqt6-dev-tools 6.6.1-2 all development tools for PyQt6
ii python3-pyqt6 6.6.1-2 arm64 Python bindings for Qt 6
ii python3-pyqt6.sip 13.6.0-1+b1 arm64 runtime module for Python extensions using SIP

Looking at the error output I see qmake referred to.
See if you have the Qt qmake installed.