0

I have tried to install pyqt6 in many possible ways including:

pip install pyqt6
pip3 install pyqt6
python -m pip install pyqt6
python3 -m pip install pyqt6
python3.9 -m pip install pyqt6

i have pip-22.3.1 and Python 3.9.1 (installed manually from source because my linux mint doesn't have 3.9 in the repository - same problem on another machine with ubuntu installed)

I always get the following error:

Collecting pyqt6
  Using cached PyQt6-6.4.0.tar.gz (1.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      Querying qmake about your Qt installation...
      Traceback (most recent call last):
        File "/home/dirk/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 144, in prepare_metadata_for_build_wheel
          hook = backend.prepare_metadata_for_build_wheel
      AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/home/dirk/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/home/dirk/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/dirk/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 148, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "/tmp/pip-build-env-g5ul20hq/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
        File "/tmp/pip-build-env-g5ul20hq/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-g5ul20hq/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 585, in setup
          self.apply_user_defaults(tool)
        File "project.py", line 65, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-g5ul20hq/overlay/lib/python3.9/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-g5ul20hq/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 236, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/tmp/pip-build-env-g5ul20hq/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py", line 78, in apply_user_defaults
          self._get_qt_configuration()
        File "/tmp/pip-build-env-g5ul20hq/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py", line 523, in _get_qt_configuration
          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.

I already found this question: Require help installing pyqt6 but nobody every answered. so i though maybe somebody can help this time?

see above, i tried many different versions of python. and i googled all the possible keywords. all i found was the hint to use 3.9 instead of 3.10 and one other thread on stack overflow (5 months ago) which got no answers.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • Use python3.10 instead python 3.9 – eyllanesc Jan 07 '23 at 23:08
  • Same issue on Ubuntu 18.04.1 LTS, with pyenv managed Python versions, of which I have tried thus far 3.6.8, 3.7.2 and 3.7.16. Busy trying 3.10.8 now... but I will answer on the older thread, if I do find a solution. – sarlacii Apr 03 '23 at 14:03

0 Answers0