『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 6121|回复: 1

[技术探讨] HomeAssistant配置Lirc组件报错,跪求大佬看下是什么原因!

[复制链接]

7

主题

201

帖子

1095

积分

论坛积极会员

积分
1095
金钱
894
HASS币
0
发表于 2020-2-29 11:39:24 | 显示全部楼层 |阅读模式
本帖最后由 kingtao1024 于 2020-2-29 11:42 编辑

系统:Mossbian
虚拟环境:
Python版本3.8.2
以下是日志:
Unable to install package python-lirc==1.2.3: ERROR: Command errored out with exit status 1:
   command: /srv/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4jk_rpmx/python-lirc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4jk_rpmx/python-lirc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-85kx215i --python-tag cp38
       cwd: /tmp/pip-install-4jk_rpmx/python-lirc/
  Complete output (87 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'lirc' extension
  creating build
  creating build/temp.linux-armv7l-3.8
  creating build/temp.linux-armv7l-3.8/lirc
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/lirc/ -I/srv/homeassistant/include -I/usr/local/include/python3.8 -c lirc/lirc.c -o build/temp.linux-armv7l-3.8/lirc/lirc.o
  lirc/lirc.c: In function ‘PyInit_lirc’:
  lirc/lirc.c:4249:3: warning: ‘tp_print’ is deprecated [-Wdeprecated-declarations]
     __pyx_type_4lirc_LircConfig.tp_print = 0;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /usr/local/include/python3.8/object.h:746:0,
                   from /usr/local/include/python3.8/pytime.h:6,
                   from /usr/local/include/python3.8/Python.h:85,
                   from lirc/lirc.c:4:
  /usr/local/include/python3.8/cpython/object.h:260:30: note: declared here
       Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
                                ^~~~~~~~
  lirc/lirc.c: In function ‘__Pyx__ExceptionSave’:
  lirc/lirc.c:5050:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
       *type = tstate->exc_type;
        
    lirc/lirc.c:5151:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = *tb;
               ^~
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /srv/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4jk_rpmx/python-lirc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4jk_rpmx/python-lirc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-b53a49qv/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.8/python-lirc Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

其他信息:
生产环境下(pip9.0.1) 手动安装
pip install python-lirc==1.2.3
安装成功
但虚拟环境下(pip19.2.3)安装失败,报错与HA相同
于是更改虚拟环境pip版本
软连接到pip9.0.1
执行pip install python-lirc==1.2.3
安装成功
但HA还是报错!实在是不明白了,搞了好几天了,求各位指点!!!谢谢了!

回复

使用道具 举报

7

主题

201

帖子

1095

积分

论坛积极会员

积分
1095
金钱
894
HASS币
0
 楼主| 发表于 2020-2-29 11:43:12 | 显示全部楼层
看日志最后,HA调用的好像还是pip19.2.3
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 21:31 , Processed in 0.131184 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表