Unable to install PyQt6 using third party helpers (poetry, pipenv)
Eli Schwartz
eschwartz at archlinux.org
Sun Jan 17 01:44:47 GMT 2021
On 1/16/21 8:37 PM, Ludovic Bellière wrote:
> 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.
I recommend submitting a bug report to poetry asking why it apparently
is not installing the build-system.requires before invoking pip install
--no-deps.
For bonus points, poetry could try to be useful software -- that is to
say, it could try installing things itself, rather than claiming to be
an installer tool but then, apparently, just... running pip install?
Rather confusing, I must say. What is poetry adding here?
--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210116/51d89fce/attachment-0001.sig>
More information about the PyQt
mailing list