I try to install pytq5 with pip and get this error
$ python3 -m pip install PyQt5
Collecting PyQt5
Using cached PyQt5-5.15.6.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
╰─> [29 lines of output]
Traceback (most recent call last):
File "/Users/olivierskonieczny/Desktop/app/python/ObjectDetection/envs/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/olivierskonieczny/Desktop/app/python/ObjectDetection/envs/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
...
...
...
[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.
I still can install other packages like lxml but can't install pytq5. I'm installing everything in virtual environment.
Any ideas ??
I faced the same problem these days. When you have a look at PyPi download site, you can read in the Installation chapter that you need "Qt's qmake tool on PATH". After installing Qt's development files everything worked fine for me. So first install it and make sure it's on your PATH and than try again.
sudo apt-get install qtbase5-dev
pip install pyqt5
PS: I think it has nothing to do with your python or pip version. I tried many versions and had this problem every time. It's just missing, corrupted or not found header development files from qt5.
Regards, Vali
I got that same error and I fixed it just by uninstalling 3.10 and installing 3.9.
Like @Ken1124 i tackeled the same issue when trying to download the tools (aka pyqt5-tools). After many tries I found it helpful to downgrade python to version 3.9.x (specifically to 3.9.9) from 3.10.x. If you currently have python 3.10 it might help, but otherwise idk...
Other methods that I tried which I didn't see to fix the issue, but perhaps fixed other problem assosicated with the issue as well:
That's all I know, wish you good luck :)