PiOverFour / MPK-M2-editor

Alternative to the official AKAI MPKMini MkII Editor
GNU General Public License v3.0
87 stars 13 forks source link

Installation Issues with M1 #17

Closed ghost closed 1 year ago

ghost commented 1 year ago

PyQt5 Installation on an M1 Mac does not seem to work properly. Not sure if you have any advice here, but I can't get pip3 install -r requirements.txt to complete without an error and the following output:

Requirement already satisfied: python-rtmidi in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from -r requirements.txt (line 1)) (1.5.6)
Collecting PyQt5 (from -r requirements.txt (line 2))
  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 "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/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/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/project.py", line 586, in setup
          self.apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-install-0ycb9l_7/pyqt5_18e6d347e3bc467980aaa54bdce294a0/project.py", line 68, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/private/var/folders/g5/cvz0g261699gwj95_b6kx4140000gp/T/pip-build-env-qzjxpg2a/overlay/lib/python3.12/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.
PiOverFour commented 1 year ago

Hi, sorry I don’t have a M1 Mac to help you troubleshoot this issue. I found a message from the PyQt mailing list, which suggests PyQt5 is not available for M1 Macs?

ghost commented 1 year ago

Thank you for the quick reply. I've installed PyQt5 via brew without error, but still seem to be getting the above output when running pip3 install -r requirements.txt

ghost commented 1 year ago

UPDATE: I was able to get everything install and have the requirments all satisifed, but it seems this won't run on an ARM chip. Closing issue, but will keep an eye out in case you get this to work with that architecture.