nut icon indicating copy to clipboard operation
nut copied to clipboard

Issue installing pyqt5 dependency from requirements

Open peadaruncanny opened this issue 1 year ago • 4 comments

While all other dependencies seem to install fine, I'm unable to install pyqt5 from requirements.txt. Something about the metadata. Pasting the terminal window output below (only referring to pyqt5 since the rest was fine). When following Nut's Mac installation guide installing pyqt5 through homebrew was fine.

Was trying to look for solutions in other places but couldn't wrap my head around the workarounds... Does anyone here experience the same issue/has found a solution?

I'm on an M1 Mac running Monterey

Collecting pyqt5 (from qt-range-slider~=0.2.7->-r requirements.txt (line 20))
  Using cached PyQt5-5.15.9.tar.gz (3.2 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
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/Users/pedrolatas/.pyenv/versions/3.9.7/lib/python3.9/site-packages/nut/testnut/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/pedrolatas/.pyenv/versions/3.9.7/lib/python3.9/site-packages/nut/testnut/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 "/Users/pedrolatas/.pyenv/versions/3.9.7/lib/python3.9/site-packages/nut/testnut/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 "/private/var/folders/q3/0hrvz6r13rv5009jf5cbrz600000gn/T/pip-build-env-w9c_wln5/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/q3/0hrvz6r13rv5009jf5cbrz600000gn/T/pip-build-env-w9c_wln5/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/private/var/folders/q3/0hrvz6r13rv5009jf5cbrz600000gn/T/pip-build-env-w9c_wln5/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 586, in setup
          self.apply_user_defaults(tool)
        File "/private/var/folders/q3/0hrvz6r13rv5009jf5cbrz600000gn/T/pip-install-yck5a6lf/pyqt5_179e78286f314a50b7eec92a2faffa18/project.py", line 68, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/q3/0hrvz6r13rv5009jf5cbrz600000gn/T/pip-build-env-w9c_wln5/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/q3/0hrvz6r13rv5009jf5cbrz600000gn/T/pip-build-env-w9c_wln5/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/private/var/folders/q3/0hrvz6r13rv5009jf5cbrz600000gn/T/pip-build-env-w9c_wln5/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 69, 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.

peadaruncanny avatar Aug 20 '23 10:08 peadaruncanny

I had the same issue, but using 3.10.8 MSC on windows works for me while 3.11.4 GCC doesn't work for me.

EvansJahja avatar Mar 20 '24 13:03 EvansJahja

Try this branch please https://github.com/blawar/nut/pull/490

introkun avatar Mar 26 '24 03:03 introkun