Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyQt5 cannot be installed #185

Closed
Killpit opened this issue Oct 6, 2023 · 11 comments
Closed

PyQt5 cannot be installed #185

Killpit opened this issue Oct 6, 2023 · 11 comments

Comments

@Killpit
Copy link

Killpit commented Oct 6, 2023

Environment : / 环境

  • OS: [macOS 14.0, Apple Silicon M1]
  • Python 3.10

Trying to install for labellmg library, having problem installing, looked at the problem from Stack Overflow and separately installed lxml.

(venv) atatekeli:waste-detection atatekeli$ pip install PyQt5
Collecting PyQt5
  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
  ╰─> [17 lines of output]
      Querying qmake about your Qt installation...
      Traceback (most recent call last):
        File "/Users/atatekeli/waste-detection/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/atatekeli/waste-detection/venv/lib/python3.10/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/atatekeli/waste-detection/venv/lib/python3.10/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/y4/jnpd1pl92r50hk6sfmrcq20c0000gn/T/pip-build-env-zqneq4pb/overlay/lib/python3.10/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
        File "/private/var/folders/y4/jnpd1pl92r50hk6sfmrcq20c0000gn/T/pip-build-env-zqneq4pb/overlay/lib/python3.10/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/private/var/folders/y4/jnpd1pl92r50hk6sfmrcq20c0000gn/T/pip-build-env-zqneq4pb/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 602, in setup
          self.update(tool)
        File "/private/var/folders/y4/jnpd1pl92r50hk6sfmrcq20c0000gn/T/pip-install-cf_xbj3g/pyqt5_0a8cd463ee7b407faaca73c7952dd14d/project.py", line 165, in update
          raise UserException(
      sipbuild.exceptions.UserException
      [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.
@Killpit
Copy link
Author

Killpit commented Oct 6, 2023

@892768447
Copy link
Member

I'll try it tomorrow.
The other way is install x64 python on Apple Silicon M1. because most x64 application can run on M1

@Killpit
Copy link
Author

Killpit commented Oct 6, 2023

sip-install: pyproject.toml: there is no such file in the current directory, did headway but I highly doubt it'd make it far from working @892768447

@Killpit
Copy link
Author

Killpit commented Oct 6, 2023

Also installed sip and still didn't work with instructions

@892768447
Copy link
Member

892768447 commented Oct 7, 2023

@bbhxwl

The simplest solution:

  1. https://www.python.org/downloads/macos/

  2. download Python 3.9.13 - May 17, 2022 Download macOS 64-bit Intel-only installer https://www.python.org/ftp/python/3.9.13/python-3.9.13-macosx10.9.pkg

  3. install python-3.9.13-macosx10.9.pkg

    Custom

屏幕截图 2023-10-07 105612

Install or upgrade pip

屏幕截图 2023-10-07 104323

  1. /Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install PyQt5
  2. /Library/Frameworks/Python.framework/Versions/3.9/bin/python3

屏幕截图 2023-10-07 104707

@Killpit
Copy link
Author

Killpit commented Oct 7, 2023

Would it create problem with Apple Silicon chips, because when I previously installed with Intel chips, one of the programs didn't work

@892768447
Copy link
Member

Usually, it can work normally. Just like the results of my tests above

@Killpit
Copy link
Author

Killpit commented Oct 7, 2023

Do you have ARM of Intel Chip for Mac

@892768447
Copy link
Member

Do you have ARM of Intel Chip for Mac

I test on
QQ截图20231007202613

@892768447
Copy link
Member

you can install Miniconda3 macOS Apple M1 64-bit pkg

conda install -c conda-forge pyqt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants