3

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 ╰─> [29 lines of output] Traceback (most recent call last): File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pep517\in_process_in_process.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_for_build_wheel'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
      main()
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\UserName\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
      whl_basename = backend.build_wheel(metadata_directory, config_settings)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
      project = AbstractProject.bootstrap('pep517')
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
      project.setup(pyproject, tool, tool_description)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\project.py", line 594, in setup
      self.apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-install-1ffm1q1f\pyqt6_3ccd59735b9b45e28a7c132c11063337\project.py", line 61, in apply_user_defaults
      super().apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
      super().apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
      self.builder.apply_user_defaults(tool)
    File "C:\Users\UserName\AppData\Local\Temp\pip-build-env-gztkrk3w\overlay\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 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. This is the error which pip shown to me

Henley04
  • 31
  • 1
  • 1
  • 2
  • 1
    Try downgrading to Python 3.9 – musicamante Apr 16 '22 at 12:12
  • Duplicate of https://stackoverflow.com/questions/69870103/how-to-fix-pyqt6-tools-installation-error – FractalLotus Apr 16 '22 at 15:26
  • The installation problem can be solved with python3.9, but running the qt designer still has another problem, a separate qt designer installer in the second answer link solved the problems.Thank you for your answers sincerely. – Henley04 Apr 17 '22 at 03:37
  • Having the same issue. What platform are you on? Currently having this issue on my M1 Mac – wesmlr Jan 24 '23 at 22:03

1 Answers1

0

(I'm using Windows 10 Enterprise 20H2 and I installed Python 3.9.7)

Install QT6 as follows. Open the command prompt as Administrator and execute the following:

  1. pip install pyqt6
  2. pip install pyqt6-tools

Then open the Environment Variables by right-clicking on the Windows logo, clicking the System tab, a new menu opens on the right side of the Settings scroll down, and click on Advanced system settings, and edit the path in the System variables and add > C:\Program Files\Python39\Lib\site-packages\qt6_applications\Qt\bin

Now you can execute QT6 Designer from the command line and from the search bar just by typing designer. Wola

Blue Robin
  • 847
  • 2
  • 11
  • 31