python - picframe Install on Raspberry Pi 3B, Bullseye OS, pi-heif wheel fails to build - Stack Overflow

Novice Raspberry Pi user here trying to build a digital picture frame. The problem I'm running int

Novice Raspberry Pi user here trying to build a digital picture frame. The problem I'm running into is the pi-heif wheel won't successfully build.

I'm using Python3.11.2, the latest libheif library is installed, and I've run all the precursory installs necessary (sudo apt-get update, python3 -m pip install -U pip, etc).

Looking through pi-heif or pillow-heif documentation doesn't provide any alternative install options or troubleshooting help.

When trying to run python3 -m pip install pi-heif or any variation of it, I'm given the error codes :

error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
ERROR: Failed building wheel for pi-heif

I'm wondering if anyone has run into a similar problem or successfully installed pi-heif on their raspberry pi? It seems to fail building on the Bookworm OS but there are a number of accounts I can find of people using picframe on their raspberries. Any insight would be greatly appreciated!

Full error message:

bash ~ $python3 -m pip install pi-heif
Looking in indexes: , 
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:5: error: implicit declaration of function ‘heif_image_handle_release_auxiliary_type’; did you mean ‘heif_image_handle_free_auxiliary_types’? [-Werror=implicit-function-declaration]
       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:21: error: incompatible types when assigning to type ‘struct heif_error’ from type ‘int’
       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)

Novice Raspberry Pi user here trying to build a digital picture frame. The problem I'm running into is the pi-heif wheel won't successfully build.

I'm using Python3.11.2, the latest libheif library is installed, and I've run all the precursory installs necessary (sudo apt-get update, python3 -m pip install -U pip, etc).

Looking through pi-heif or pillow-heif documentation doesn't provide any alternative install options or troubleshooting help.

When trying to run python3 -m pip install pi-heif or any variation of it, I'm given the error codes :

error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
ERROR: Failed building wheel for pi-heif

I'm wondering if anyone has run into a similar problem or successfully installed pi-heif on their raspberry pi? It seems to fail building on the Bookworm OS but there are a number of accounts I can find of people using picframe on their raspberries. Any insight would be greatly appreciated!

Full error message:

bash ~ $python3 -m pip install pi-heif
Looking in indexes: https://pypi./simple, https://www.piwheels./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:5: error: implicit declaration of function ‘heif_image_handle_release_auxiliary_type’; did you mean ‘heif_image_handle_free_auxiliary_types’? [-Werror=implicit-function-declaration]
       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:21: error: incompatible types when assigning to type ‘struct heif_error’ from type ‘int’
       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)
Share Improve this question asked Nov 16, 2024 at 16:37 Sandra SerbuSandra Serbu 111 bronze badge 2
  • python3 -m pip install wheel – user4136999 Commented Nov 16, 2024 at 18:41
  • pip3 install wheel – user4136999 Commented Nov 16, 2024 at 18:48
Add a comment  | 

1 Answer 1

Reset to default 0

Requirement already satisfied: pillow>=10.1.0 in ./vene/lib/python3.11/site-packages (from pi-heif) (11.0.0)

You need to install latest PILLOW version 11.0.0.

Mine is older version 9.5.0.

On your side, you need to install python3 -m pip install wheel before install pi-heif.

Today, I tried your command python3 -m pip install pi-heif

Here you can see my output using Bullseye Pi 3B:

supra@pi:~ $ python3 -m pip install pi-heif
Looking in indexes: https://pypi./simple, https://www.piwheels./simple
Collecting pi-heif
  Downloading pi_heif-0.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (936 kB)
     |████████████████████████████████| 936 kB 4.2 MB/s 
Collecting pillow>=10.1.0
  Downloading pillow-11.0.0-cp39-cp39-manylinux_2_28_aarch64.whl (4.2 MB)
     |████████████████████████████████| 4.2 MB 6.3 MB/s 
Installing collected packages: pillow, pi-heif
  Attempting uninstall: pillow
    Found existing installation: Pillow 9.5.0
    Uninstalling Pillow-9.5.0:
      Successfully uninstalled Pillow-9.5.0
Successfully installed pi-heif-0.20.0 pillow-11.0.0

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745651536a4638294.html

相关推荐

  • 国产车载通信测试方案:车规级CAN SIC芯片测试技术解析

    随着智能网联汽车的快速发展,车辆内部电子控制单元(ECU)数量激增,动力总成、高级驾驶辅助系统(ADAS)、车身控制等功能对车载通信网络的稳定性与速率提出了更高要求。传统CAN FD总线在复杂拓扑中面临信号振铃、通信速率受限(实际速率通常低

    1小时前
    00
  • 最简 Odoo 部署方法:Websoft9 企业应用托管平台

    传统方式部署 Odoo 通常依赖 Docker 技术,主要分为以下步骤:1 . 安装 Docker需在服务器上安装 Docker 引擎,涉及操作系统兼容性检查、依赖包安装、镜像源配置等操作。代码语言:bash复制 # 以 Ubu

    1小时前
    00
  • Prometheus配置docker采集器

    Prometheus 配置 Docker 采集器Prometheus 是一个开源的监控系统和时间序列数据库,广泛用于容器化环境中。通过监控 Docker 容器,用户可以实时获取服务性能、资源使用情况等信息。本文将介绍如何为 Docker 容

    59分钟前
    00
  • 开源在线考试系统

    看到调问已经开始扩展在线考试的场景,试了一下,发现在线考试的基本能力都已经支持了。主要是考试中的各种计分功能,包括对每道题的选项设置分值计算、考试时间限制等,和官方了解了一下,考试中的其他各项能力也在逐步完善,有需求可以随时

    56分钟前
    00
  • 深度学习在DOM解析中的应用:自动识别页面关键内容区块

    爬虫代理摘要本文介绍了如何在爬取东方财富吧()财经新闻时,利用深度学习模型对 DOM 树中的内容区块进行自动识别和过滤,并将新闻标题、时间、正文等关键信息分类存储。文章聚焦爬虫整体性能瓶颈,通过指标对比、优化策略、压测数据及改进结果,展示了

    46分钟前
    10
  • UCB的硅光MEMS OCS控制技术

    昨天写的旭创与nEye合作了一个64端口硅光OCS一、光电路交换技术概述(一)电交换与分组交换电路交换的概念源于早期的电话交换机,通过物理连接实现设备间的通信,就像早期打电话时,接线员手动连接线路一样。而分组交换则是

    43分钟前
    00
  • 推荐一个轻量级的监控平台并且支持移动端

    简介XUGOU 是基于Cloudflare构建的轻量化监控平台,专精于系统资源监控与可视化状态页面服务。该平台提供英文简体中文双语支持,满足全球化部署需求。面向开发者及中小团队,项目致力于提供高可用性的监控解决方案。核心功能与实现平台功能

    41分钟前
    00
  • module 'torch.

    踩坑Ascend, 安装 pytorch 2.5.1 和 pytorch_npu 2.5.1, import torch 报错.执行 python -c "import torch;import torch_npu;"时

    40分钟前
    10
  • 重装系统只影响C盘吗?深入解析系统重装的全过程

    重装系统只影响C盘吗?深入解析系统重装的全过程 在计算机的日常使用中,重装系统是一个常见的操作,尤其是在系统出现故障、感染病毒或需要优化系统性能时。然而,许多用户对于重装系统的具体过程和影响存在误解,认为重装系统仅仅是对C盘进行清空和重置

    38分钟前
    10
  • 在VMware虚拟机中安装Windows 7全攻略(避坑指南)

    ⚠️写在前面 最近发现很多开发者在调试老旧系统时都需要用到Windows 7环境(特别是银行、医疗等行业的遗留系统),但实体机安装既不现实也不安全。今天就手把手教你在虚拟机

    30分钟前
    00
  • 雨晨 22635.5170 Windows 11 企业版 23H2 轻装版

    文件: 雨晨 22635.5170 Windows 11 企业版 23H2 轻装版 install.esd 大小: 2920270404 字节 修改时间: 2025年4月8日, 星期二, 11 : 04 : 59 MD5: D5F8F0AD

    27分钟前
    00
  • 人工智能适合什么人学

    一、引言:人工智能浪潮下的新机遇在当今科技飞速发展的时代,人工智能(AI)无疑是最为耀眼的技术明星之一。从智能语音助手到自动驾驶汽车,从医疗诊断辅助到金融风险预测,人工智能正以前所未有的速度改变着我们的生活和工作方式。随着全球领先的终身学习

    25分钟前
    00
  • Windows系统密钥检测工具PIDKey 2.1中文版

    Windows系统密钥检测工具PIDKey 2.1中文版 【下载地址】Windows系统密钥检测工具PIDKey2.1中文版 Windows系统密钥检测工具PIDKey 2.1中文版是一款功能强大的工具,专为管理Win

    25分钟前
    00
  • 雨晨 26200.5516 Windows 11 IoT 企业版 LTSC 2024 轻装版

    简述:以下为YCDISM (雨晨作品自2025年03月25日起通用介绍,若无重大更改不再额外敖述) 全程由最新YCDISM2025脱机装载26100.1742_zh-cn_windows_11_

    21分钟前
    00
  • Java&Activiti7实战:轻松构建你的第一个工作流

    本文已收录在Github,关注我,紧跟本系列专栏文章,咱们下篇再续!

    19分钟前
    00
  • 人工智能应用领域有哪些

    人工智能应用领域有哪些一、引言随着科技的飞速发展,人工智能(AI)已经逐渐渗透到我们生活的方方面面,成为推动社会进步的重要力量。从医疗健康到金融服务,从教育学习到智能制造,人工智能以其独特的技术优势,为各行各业带来了前所未有的变革。本文旨在

    17分钟前
    10
  • VoidZero 的野心,开发者的福音!

    前言昨天分享了尤雨溪公司 VoidZero 最新的产品 TSDown,我相信肯定有同学和我一样好奇,尤雨溪为什么要推出这么多工具,来增加大家的学习压力!今天我们从整体上分析下,这些产品的功能和目的!正文VoidZero 是尤雨溪于 2020

    11分钟前
    00
  • 解决Windows 10家庭单语言版语言限制:升级专业版全攻略

    解决Windows 10家庭单语言版语言限制:升级专业版全攻略 在日常使用Windows 10系统时,部分用户可能会遇到系统提示“当前许可证仅支持单一显示语言”的困扰。这一问题通常出现在预装或激活了Windows 10家庭单语言版的设备上

    10分钟前
    00
  • IDEA 2025.1 版震撼发布,建议更新

    好久不见甚是想念,有小伙伴催更了。 各位编程大神们!今天我要给大家带来一个超级劲爆的消息!IntelliJ IDEA 2025.1 终极版震撼发布啦!就像一颗超级炸弹在编程界炸开,这些新特性能让咱们的开发效率直接翻倍,简直爽歪歪

    3分钟前
    00
  • 连Claude 3.5都败下阵来,大语言模型能否定位软件服务的故障根因?

    论文的第一作者是香港中文大学(深圳)数据科学学院三年级博士生徐俊杰龙,指导老师为香港中文大学(深圳)数据科学学院的贺品嘉教授和微软主管研究员何世林博士。贺品嘉老师团队的研究重点是软件工程、LLM for DevOps、大模型安全。大型语言模

    1分钟前
    00

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信