You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派OS安装python-fingerprint模块失败,依赖问题求助

解决树莓派OS安装python-fingerprint的依赖问题

方案1:适配Python2环境(仅适配仍支持Python2的旧版树莓派OS)

  • 编辑软件源配置文件,添加Python2支持的legacy源:
    sudo nano /etc/apt/sources.list
    
    在文件末尾追加:

    deb http://legacy.raspbian.org/raspbian/ stretch main contrib non-free rpi

  • 更新源缓存:
    sudo apt update
    
  • 手动安装缺失的Python2依赖:
    sudo apt-get install python-serial python-pil
    
  • 再次尝试安装python-fingerprint:
    sudo apt-get install python-fingerprint
    
  • 若出现签名验证错误,导入对应GPG密钥:
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9165938D90FDDD2E
    

方案2:改用Python3版本指纹模块(推荐,Python2已停止维护)

  • 安装Python3对应的依赖包:
    sudo apt-get install python3-serial python3-pil
    
  • 通过pip3安装Python3兼容的pyfingerprint模块:
    sudo pip3 install pyfingerprint
    
  • 验证安装是否成功:
    python3 -c "from pyfingerprint import PyFingerprint; print('安装成功')"
    

内容的提问来源于stack exchange,提问作者Manorama

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 11:57:24