Я использую Python3.11.2, установлена последняя версия библиотеки libheif, и я запустил все необходимые предварительные установки (sudo apt-get update, python3 -m pip install -U pip и т. д.).
Просмотр документации pi-heif или Pillow-Heif не дает никаких результатов. альтернативные варианты установки или помощь по устранению неполадок.
При попытке запустить python3 -m pip install pi-heif или любой его вариант мне выдаются коды ошибок:
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
ERROR: Failed building wheel for pi-heif
Мне интересно, сталкивался ли кто-нибудь с подобной проблемой или успешно установил pi-heif на свой Raspberry Pi? Кажется, что он не работает на ОС Bookworm, но я могу найти несколько аккаунтов людей, использующих picframe на своей малине. Мы будем очень признательны за любую информацию!
Полное сообщение об ошибке:
bash ~ $python3 -m pip install pi-heif
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pi-heif
Using cached pi_heif-0.20.0.tar.gz (16.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pillow>=10.1.0 in ./vene/lib/python3.11/site-packages (from pi-heif) (11.0.0)
Building wheels for collected packages: pi-heif
Building wheel for pi-heif (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pi-heif (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [46 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/constants.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/heif.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/_deffered_error.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/misc.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/AvifImagePlugin.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/options.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/HeifImagePlugin.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/as_plugin.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/_lib_info.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/_version.py -> build/lib.linux-armv7l-cpython-311/pi_heif
copying pi_heif/__init__.py -> build/lib.linux-armv7l-cpython-311/pi_heif
running build_ext
Looking for `libheif` using pkg-config.
Checking for include file 'heif.h' in '/usr/include/arm-linux-gnueabihf'
Checking for include file 'heif.h' in '/usr/include/arm-linux-gnueabihf/libheif'
Found 'heif.h' in '/usr/include/arm-linux-gnueabihf/libheif'
building '_pi_heif' extension
creating build/temp.linux-armv7l-cpython-311/pi_heif
arm-linux-gnueabihf-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/arm-linux-gnueabihf -I/usr/include -I/home/serbu/vene/include -I/usr/local/include -I/home/serbu/vene/include -I/usr/include/python3.11 -c pi_heif/_pi_heif.c -o build/temp.linux-armv7l-cpython-311/pi_heif/_pi_heif.o -Ofast -Werror
pi_heif/_pi_heif.c: In function ‘_CtxAuxImage’:
pi_heif/_pi_heif.c:760:21: error: implicit declaration of function ‘heif_image_handle_get_preferred_decoding_colorspace’ [-Werror=implicit-function-declaration]
760 | if (check_error(heif_image_handle_get_preferred_decoding_colorspace(aux_handle, &colorspace, &chroma))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi_heif/_pi_heif.c:760:21: error: incompatible type for argument 1 of ‘check_error’
760 | if (check_error(heif_image_handle_get_preferred_decoding_colorspace(aux_handle, &colorspace, &chroma))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
pi_heif/_pi_heif.c:14:35: note: expected ‘struct heif_error’ but argument is of type ‘int’
14 | int check_error(struct heif_error error) {
| ~~~~~~~~~~~~~~~~~~^~~~~
pi_heif/_pi_heif.c: In function ‘_get_aux_type’:
pi_heif/_pi_heif.c
1310 | heif_image_handle_release_auxiliary_type(aux_handle, &aux_type_c);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| heif_image_handle_free_auxiliary_types
pi_heif/_pi_heif.c: In function ‘_load_file’:
pi_heif/_pi_heif.c
1510 | error = heif_image_handle_get_preferred_decoding_colorspace(handle, &colorspace, &chroma);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pi-heif
Failed to build pi-heif
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml b
```ased projects (pi-heif)
Подробнее здесь: https://stackoverflow.com/questions/791 ... s-to-build
Мобильная версия