|
发表于 2017-8-8 19:46:04
|
显示全部楼层
系统为:Ubuntu17.04,不是虚拟机安装的
运行到这步:pip3 install netdisco
提示信息如下:
Collecting netdisco
Using cached netdisco-1.1.0-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.0 in ./homeassistant_venv/lib/python3.6/site-packages (from netdisco)
Collecting zeroconf==0.19 (from netdisco)
Using cached zeroconf-0.19.0-py2.py3-none-any.whl
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.6/site-packages (from zeroconf==0.19->netdisco)
Collecting enum-compat (from zeroconf==0.19->netdisco)
Using cached enum-compat-0.0.2.tar.gz
Installing collected packages: netifaces, enum-compat, zeroconf, netdisco
Running setup.py install for netifaces ... error
Complete output from command /srv/homeassistant/homeassistant_venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bb05q6z6/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-jxdt25kv-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.6/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
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-GSVY_6/python3.6-3.6.0~b2=. -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.6m -c netifaces.c -o build/temp.linux-i686-3.6/netifaces.o
netifaces.c:1:20: fatal error: Python.h: 没有那个文件或目录
#include <Python.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/srv/homeassistant/homeassistant_venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bb05q6z6/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-jxdt25kv-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.6/netifaces" failed with error code 1 in /tmp/pip-build-bb05q6z6/netifaces/
请问该如何解决? |
|