Unable to install PyQt6 using third party helpers (poetry, pipenv)

Ludovic Bellière belliere.ludovic at proximus.be
Sun Jan 17 01:37:06 GMT 2021


Hi,

I spent the last couple of hours trying to migrate one of my project to
PyQt6, however it seems that I have encountered some issues that are
beyond my understanding. PyQt6 seems to install fine when using
pip directly, however whenever I use pipenv or poetry, it fails with
the following error:

> Command ['/home/xx/.cache/pypoetry/virtualenvs/xx-_xx-py3.8/bin/pip', 'install', '--no-deps', '/home/xx/.cache/pypoetry/artifacts/9f/e5/4f/8c942b1b7e85a41e4f60f423ebcf98c81e6ce31c589eaa9f186c9e878e/PyQt6-6.0.0.tar.gz'] errored with the following return code 1, and output
> ...
> ERROR: Command errored out with exit status 1:
>  command: /home/xx/.cache/pypoetry/virtualenvs/xx-_xx-py3.8/bin/python /home/xx/.cache/pypoetry/virtualenvs/xx-_xx-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py
> prepare_metadata_for_build_wheel /tmp/tmpk1sn4iki
>      cwd: /tmp/pip-req-build-ml08pgo8
> Complete output (26 lines):
> Querying qmake about your Qt installation...
> /usr/bin/qmake -query
> Traceback (most recent call last):
>   File "/home/xx/.cache/pypoetry/virtualenvs/xx-_xx-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 126, 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'


I use pyenv to juggle around with different python versions. The
versions of pip, wheel and setuptools used by poetry are all up to
date. No error occurs if I enter the virtualenv shell and manually call
`pip install pyqt6`.

From what I can gather it is failing due to the way those tools
install packages, they are using the `--no-deps` argument which prevent
SIP6 from being installed beforehand. It is, presumably, because they
handle dependencies resolution themselves. That behavior can be
reproduced manually, and a work around the error would be to install
SIP first, then PyQt6. However the tools (pipenv and poetry) do not
seem to be able to handle that process. Yet calling `poetry run pip
install pyqt6` goes fine.

I don't know how to solve this issue, nor if it lies with pyqt6 or with
the third party tools.

Any help or insight on this conundrum would be greatly appreciated.

Best Regards,
Ludovic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Signature digitale OpenPGP
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210117/78d95f6a/attachment.sig>


More information about the PyQt mailing list