Installing PyQt6 on Raspberry Pi

Phil Thompson phil at riverbankcomputing.com
Tue Apr 19 08:41:46 BST 2022


On 19/04/2022 01:44, John Fowler wrote:
> Good Day,
> 
> Has anyone been successful in installing PyQt6 on a Raspberry Pi?
> 
> It failed on mine.
> 
> pi at cyva:~ $ pip install pyqt6
> Defaulting to user installation because normal site-packages is not 
> writeable
> Looking in indexes: https://pypi.org/simple, 
> https://www.piwheels.org/simple
> Collecting pyqt6
>   Downloading PyQt6-6.3.0.tar.gz (1.0 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 3.2 MB/s eta 
> 0:00:00
>   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
>   ╰─> [24 lines of output]
>       Querying qmake about your Qt installation...
>       /usr/bin/qmake -query
>       Traceback (most recent call last):
>         File
> "/home/pi/.local/lib/python3.7/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
> "/home/pi/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py",
> line 363, in <module>
>           main()
>         File
> "/home/pi/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py",
> line 345, in main
>           json_out['return_val'] = hook(**hook_input['kwargs'])
>         File
> "/home/pi/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py",
> line 160, in prepare_metadata_for_build_wheel
>           whl_basename = backend.build_wheel(metadata_directory,
> config_settings)
>         File
> "/tmp/pip-build-env-w0q9edpb/overlay/lib/python3.7/site-packages/sipbuild/api.py",
> line 51, in build_wheel
>           project = AbstractProject.bootstrap('pep517')
>         File
> "/tmp/pip-build-env-w0q9edpb/overlay/lib/python3.7/site-packages/sipbuild/abstract_project.py",
> line 83, in bootstrap
>           project.setup(pyproject, tool, tool_description)
>         File
> "/tmp/pip-build-env-w0q9edpb/overlay/lib/python3.7/site-packages/sipbuild/project.py",
> line 610, in setup
>           self.update(tool)
>         File "project.py", line 166, in update
>       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.

Try downloading the sdist and using sip-install rather than pip. It will 
be much easier to see what i sgoing on.

Phil


More information about the PyQt mailing list