adamtheone / canDrive

Tools for hacking your car
https://www.youtube.com/playlist?list=PLNiFaO8hU1z0o_6DSxk-jcVAM3UCUR-pY
MIT License
525 stars 145 forks source link

Metadata Generation Failed #43

Closed Lizzit closed 3 months ago

Lizzit commented 3 months ago

I'm trying to install the dependencies for the GUI and i found out that there is a problem installing the pyqt5-tools library. Each and every time i try to install it, it send me the following error:

 error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [26 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 
      Traceback (most recent call last):
        File "C:\Users\Elia\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\Elia\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main   
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Elia\AppData\Local\Programs\Python\Python312\Lib\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 "C:\Users\Elia\AppData\Local\Temp\pip-build-env-op7nzl8h\overlay\Lib\site-packages\sipbuild\api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Elia\AppData\Local\Temp\pip-build-env-op7nzl8h\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 92, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "C:\Users\Elia\AppData\Local\Temp\pip-build-env-op7nzl8h\overlay\Lib\site-packages\sipbuild\project.py", line 587, in setup
          self.apply_user_defaults(tool)
        File "C:\Users\Elia\AppData\Local\Temp\pip-install-mv34ku4o\pyqt5_8885985acfb84385bd01e038c77ae524\project.py", line 63, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\Elia\AppData\Local\Temp\pip-build-env-op7nzl8h\overlay\Lib\site-packages\pyqtbuild\project.py", line 51, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "C:\Users\Elia\AppData\Local\Temp\pip-build-env-op7nzl8h\overlay\Lib\site-packages\sipbuild\project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "C:\Users\Elia\AppData\Local\Temp\pip-build-env-op7nzl8h\overlay\Lib\site-packages\pyqtbuild\builder.py", line 50, 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.

SPECS:

markkthemk commented 3 months ago

Using Python 3.11 should fix this issue. Adam used 3.8 during development.

Lizzit commented 3 months ago

ok, but with the two version of python installed how can i call the pip of the 3.11 instead of the pip of the 3.12 using windows? Using each time this is really time consuming:

C:/Users/user/AppData/Local/Programs/Python/Python311/python.exe -m pip install ...
adamtheone commented 3 months ago

I'd suggest using a virtual environment (venv), or have only that python version installed, or search solutions for pyqt5 in the relevant forums/threads.