阿里源不行,龟速用官方源,到下面这步出错了,望囧神能帮忙解决下啦
#安装依赖netdisco,理论上直接默认安装即可,但有的Hass版本需要指定1.0.0rc3,则按下面的命令输入
pip3 install netdisco
#pip3 install netdisco==1.0.0rc3
复制代码
这两个都试过了,都报错
(homeassistant_venv) homeassistant@orangepizero:/srv/homeassistant$ pip3 install netdisco
Collecting netdisco
Using cached netdisco-1.0.1-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.0 in ./homeassistant_venv/lib/python3.5/site-packages (from netdisco)
Collecting zeroconf==0.19 (from netdisco)
Using cached zeroconf-0.19.0-py2.py3-none-any.whl
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./homeassistant_venv/lib/python3.5/site-packages (from requests>=2.0->netdisco)
Requirement already satisfied: urllib3<1.22,>=1.21.1 in ./homeassistant_venv/lib/python3.5/site-packages (from requests>=2.0->netdisco)
Requirement already satisfied: certifi>=2017.4.17 in ./homeassistant_venv/lib/python3.5/site-packages (from requests>=2.0->netdisco)
Requirement already satisfied: idna<2.6,>=2.5 in ./homeassistant_venv/lib/python3.5/site-packages (from requests>=2.0->netdisco)
Collecting netifaces<=0.10.4 (from zeroconf==0.19->netdisco)
Using cached netifaces-0.10.4.tar.gz
Requirement already satisfied: six in ./homeassistant_venv/lib/python3.5/site-packages (from zeroconf==0.19->netdisco)
Requirement already satisfied: enum-compat in ./homeassistant_venv/lib/python3.5/site-packages (from zeroconf==0.19->netdisco)
Installing collected packages: netifaces, zeroconf, netdisco
Running setup.py install for netifaces ... error
Complete output from command /srv/homeassistant/homeassistant_venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sqd053yi/netifaces/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-1_mlq4b_-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.5/netifaces:
running install
running build
running build_ext
checking for getifaddrs...found.
checking for getnameinfo...found.
checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h linux/irda.h linux/atm.h linux/llc.h linux/tipc.h linux/dn.h.
checking whether struct sockaddr has a length field...no.
checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un ash ec ll atmpvc atmsvc dn irda llc.
checking for routing socket support...no.
checking for sysctl(CTL_NET...) support...no.
checking for netlink support...yes.
will use netlink to read routing table
building 'netifaces' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DNETIFACES_VERSION=0.10.4 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_IRDA_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_IRDA=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/srv/homeassistant/homeassistant_venv/include -I/usr/include/python3.5m -c netifaces.c -o build/temp.linux-armv7l-3.5/netifaces.o
netifaces.c:1:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/srv/homeassistant/homeassistant_venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sqd053yi/netifaces/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-1_mlq4b_-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.5/netifaces" failed with error code 1 in /tmp/pip-build-sqd053yi/netifaces/
复制代码