'PyQt6 Installation failed on building dependencies

I am trying to install PyQt6 with pip. But it could not succeed.I am using python 3.9.0 32 bit in Windows 8.1.

I tried PyQt5 installation ,it works fine. I think there is something error with building dependencies and some metadata generation process. Is there any unofficial wheel for PyQt6? Can anyone help me out?

Here is the Error:

C:\Users\Rajkumar\Desktop>pip install PyQt6
Collecting PyQt6
  Using cached PyQt6-6.2.3.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

  x Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ?─> [29 lines of output]
      Traceback (most recent call last):
        File "e:\python\lib\site-packages\pip\_vendor\pep517\in_process\_in_proc
ess.py", line 156, in prepare_metadata_for_build_wheel
          hook = backend.prepare_metadata_for_build_wheel
      AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_f
or_build_wheel'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "e:\python\lib\site-packages\pip\_vendor\pep517\in_process\_in_proc
ess.py", line 363, in <module>
          main()
        File "e:\python\lib\site-packages\pip\_vendor\pep517\in_process\_in_proc
ess.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "e:\python\lib\site-packages\pip\_vendor\pep517\in_process\_in_proc
ess.py", line 160, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings
)
        File "C:\Users\Rajkumar\AppData\Local\Temp\pip-build-env-ws9aovo_\overla
y\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
          project = AbstractProject.bootstrap('pep517')
        File "C:\Users\Rajkumar\AppData\Local\Temp\pip-build-env-ws9aovo_\overla
y\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "C:\Users\Rajkumar\AppData\Local\Temp\pip-build-env-ws9aovo_\overla
y\Lib\site-packages\sipbuild\project.py", line 594, in setup
          self.apply_user_defaults(tool)
        File "project.py", line 67, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\Rajkumar\AppData\Local\Temp\pip-build-env-ws9aovo_\overla
y\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\Rajkumar\AppData\Local\Temp\pip-build-env-ws9aovo_\overla
y\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "C:\Users\Rajkumar\AppData\Local\Temp\pip-build-env-ws9aovo_\overla
y\Lib\site-packages\pyqtbuild\builder.py", line 67, in apply_user_defaults
          raise PyProjectOptionException('qmake',
      sipbuild.pyproject.PyProjectOptionException
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem wit
h pip.
error: metadata-generation-failed

x 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.

C:\Users\Rajkumar\Desktop>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source