PyQt5 cannot be installed
Killpit opened this issue · 11 comments
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.
Tried it and still failed to install it
I'll try it tomorrow.
The other way is install x64 python on Apple Silicon M1. because most x64 application can run on M1
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
Also installed sip and still didn't work with instructions
The simplest solution:
-
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
-
install python-3.9.13-macosx10.9.pkg
Custom
Install or upgrade pip
- /Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install PyQt5
- /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
Would it create problem with Apple Silicon chips, because when I previously installed with Intel chips, one of the programs didn't work
Usually, it can work normally. Just like the results of my tests above
Do you have ARM of Intel Chip for Mac
you can install Miniconda3 macOS Apple M1 64-bit pkg
conda install -c conda-forge pyqt



