I have a problem installing a PyQt5 python package. I am in Yocto Linux environment (Hardknott kernel 5.10.35) on the Variscite board (DART-MX8M-PLUS). This is the log when I try to install with pip:
JavaScript
x
52
52
1
root@imx8mp-var-dart:~# pip install pyqt5
2
Collecting pyqt5
3
Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
4
Installing build dependencies done
5
Getting requirements to build wheel done
6
Preparing metadata (pyproject.toml) error
7
error: subprocess-exited-with-error
8
9
× Preparing metadata (pyproject.toml) did not run successfully.
10
│ exit code: 1
11
╰─> [29 lines of output]
12
Traceback (most recent call last):
13
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
14
hook = backend.prepare_metadata_for_build_wheel
15
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
16
17
During handling of the above exception, another exception occurred:
18
19
Traceback (most recent call last):
20
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
21
main()
22
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
23
json_out['return_val'] = hook(**hook_input['kwargs'])
24
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
25
whl_basename = backend.build_wheel(metadata_directory, config_settings)
26
File "/tmp/pip-build-env-j1_dul47/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 51, in build_wheel
27
project = AbstractProject.bootstrap('pep517')
28
File "/tmp/pip-build-env-j1_dul47/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
29
project.setup(pyproject, tool, tool_description)
30
File "/tmp/pip-build-env-j1_dul47/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 594, in setup
31
self.apply_user_defaults(tool)
32
File "/tmp/pip-install-w8dpcxmz/pyqt5_db6cfa3b68b641d3a6209736257b28c5/project.py", line 63, in apply_user_defaults
33
super().apply_user_defaults(tool)
34
File "/tmp/pip-build-env-j1_dul47/overlay/lib/python3.9/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
35
super().apply_user_defaults(tool)
36
File "/tmp/pip-build-env-j1_dul47/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 241, in apply_user_defaults
37
self.builder.apply_user_defaults(tool)
38
File "/tmp/pip-build-env-j1_dul47/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults
39
raise PyProjectOptionException('qmake',
40
sipbuild.pyproject.PyProjectOptionException
41
[end of output]
42
43
note: This error originates from a subprocess, and is likely not a problem with pip.
44
error: metadata-generation-failed
45
46
× Encountered error while generating package metadata.
47
╰─> See above for output.
48
49
note: This is an issue with the package mentioned above, not pip.
50
hint: See above for details.
51
root@imx8mp-var-dart:~#
52
Instead, this is the list of currently installed python packages:
JavaScript
1
37
37
1
root@imx8mp-var-dart:~# pip list
2
Package Version
3
----------------- --------------
4
attrs 20.3.0
5
btrfsutil 5.10.1
6
cycler 0.11.0
7
decorator 5.0.7
8
deepview-rt 2.4.25
9
fonttools 4.29.1
10
future 0.18.2
11
gpg 1.15.1-unknown
12
iniparse 0.4
13
kiwisolver 1.3.2
14
libcomps 0.1.15
15
matplotlib 3.5.1
16
mne 0.24.1
17
numpy 1.20.1
18
packaging 21.3
19
Pillow 8.2.0
20
pip 22.0.3
21
psutil 5.8.0
22
pyarmnn 24.0.0
23
pycairo 1.20.0
24
PyGObject 3.38.0
25
pyparsing 3.0.7
26
python-dateutil 2.8.2
27
scipy 1.8.0
28
setuptools 60.9.3
29
six 1.15.0
30
tflite-runtime 2.4.1
31
toml 0.10.2
32
torch 1.7.1
33
torchvision 0.8.2
34
tvm 0.7.0
35
typing-extensions 3.7.4.3
36
root@imx8mp-var-dart:~#
37
How can it be solved? Thanks in advance!
Advertisement
Answer
Do not bother installing packages natively on the board,
PyQt5
is already supported by Yocto
in meta-qt5
, link to recipe.
Just add meta-qt5
to your bblayers.conf
and :
JavaScript
1
2
1
IMAGE_INSTALL_append = " python3-pyqt5"
2