Hi
I am struggling to install pyqt5.
All the dependencies get installed successfully but then it fails with
pip install -v --no-cache-dir --prefer-binary pyqt5
fails with - AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
environment - RPi 4 with 8 GB RAM, python - 3.8.7, pip 21.3.1
complete error message
Using pip 21.3.1 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
Defaulting to user installation because normal site-packages is not writeable
Collecting pyqt5
Downloading PyQt5-5.15.6.tar.gz (3.2 MB)
|¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 3.2 MB 1.8 MB/s
Running command /usr/local/bin/python3 /tmp/pip-standalone-pip-v8_euyno/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-9e__4znn/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --prefer-binary -- 'sip >=6.4, <7' 'PyQt-builder >=1.9, <2'
Collecting sip<7,>=6.4
Using cached sip-6.4.0-cp36-abi3-linux_armv7l.whl
Collecting PyQt-builder<2,>=1.9
Using cached PyQt_builder-1.12.2-py3-none-any.whl (5.6 MB)
Collecting packaging
Using cached packaging-21.2-py3-none-any.whl (40 kB)
Collecting setuptools
Using cached setuptools-58.5.3-py3-none-any.whl (946 kB)
Collecting toml
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting pyparsing<3,>=2.0.2
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Installing collected packages: pyparsing, toml, setuptools, packaging, sip, PyQt-builder
Successfully installed PyQt-builder-1.12.2 packaging-21.2 pyparsing-2.4.7 setuptools-58.5.3 sip-6.4.0 toml-0.10.2
Installing build dependencies ... done
Running command /usr/local/bin/python3 /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpa50av598
Getting requirements to build wheel ... done
Running command /usr/local/bin/python3 /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp_16ohk2q
Traceback (most recent call last):
File "/usr/local/lib/python3.8/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 "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.8/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-9e__4znn/overlay/lib/python3.8/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/tmp/pip-build-env-9e__4znn/overlay/lib/python3.8/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-9e__4znn/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 587, in setup
self.apply_user_defaults(tool)
File "project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-9e__4znn/overlay/lib/python3.8/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-9e__4znn/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 234, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/tmp/pip-build-env-9e__4znn/overlay/lib/python3.8/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
Preparing metadata (pyproject.toml) ... error
[EDIT]: Added code tags. Rich