Issue installing on Fedora 23

Hi All,

New to this forum and project… Followed the instructions…

  1. checked if I had Phyton3…

[code]python3
Python 3.4.3 (default, Jun 29 2015, 12:16:01)
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

[/code]

  1. pip3 install homeassistant

You are using pip version 7.1.0, however version 8.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting homeassistant Downloading homeassistant-0.14.2-py2.py3-none-any.whl (1.2MB) 100% |████████████████████████████████| 1.2MB 213kB/s Collecting pyyaml<4,>=3.11 (from homeassistant) Downloading PyYAML-3.11.tar.gz (248kB) 100% |████████████████████████████████| 249kB 764kB/s Collecting pytz>=2015.4 (from homeassistant) Downloading pytz-2015.7-py2.py3-none-any.whl (476kB) 100% |████████████████████████████████| 479kB 578kB/s Collecting requests<3,>=2 (from homeassistant) Downloading requests-2.9.1-py2.py3-none-any.whl (501kB) 100% |████████████████████████████████| 503kB 525kB/s Requirement already satisfied (use --upgrade to upgrade): pip>=7.0.0 in /usr/lib/python3.4/site-packages (from homeassistant) Collecting vincenty==0.1.3 (from homeassistant) Downloading vincenty-0.1.3.tar.gz Collecting jinja2>=2.8 (from homeassistant) Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB) 100% |████████████████████████████████| 266kB 223kB/s Collecting MarkupSafe (from jinja2>=2.8->homeassistant) Downloading MarkupSafe-0.23.tar.gz Installing collected packages: pyyaml, pytz, requests, vincenty, MarkupSafe, jinja2, homeassistant Running setup.py install for pyyaml Running setup.py install for vincenty Running setup.py install for MarkupSafe Successfully installed MarkupSafe-0.23 homeassistant-0.14.2 jinja2-2.8 pytz-2015.7 pyyaml-3.11 requests-2.9.1 vincenty-0.1.3

  1. hass (missing netdisco)

... INFO:homeassistant.util.package:Attempting install of netdisco==0.5.2 Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-4a_tr4p1/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8rxt9szt-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpc2b1nesl" failed with error code 1 in /tmp/pip-build-4a_tr4p1/netifaces ERROR:homeassistant.bootstrap:Not initializing discovery because could not install dependency netdisco==0.5.2 ...

  1. tried installing netdisco manually

[code]pip3 install --user netdisco==0.5.2
You are using pip version 7.1.0, however version 8.0.3 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
Collecting netdisco==0.5.2
Using cached netdisco-0.5.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in /usr/lib/python3.4/site-packages (from netdisco==0.5.2)
Collecting zeroconf>=0.17.4 (from netdisco==0.5.2)
Using cached zeroconf-0.17.4-py2.py3-none-any.whl
Collecting netifaces (from zeroconf>=0.17.4->netdisco==0.5.2)
Using cached netifaces-0.10.4.tar.gz
Collecting enum-compat (from zeroconf>=0.17.4->netdisco==0.5.2)
Using cached enum-compat-0.0.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3.4/site-packages (from zeroconf>=0.17.4->netdisco==0.5.2)
Installing collected packages: netifaces, enum-compat, zeroconf, netdisco
Running setup.py install for netifaces
Complete output from command /usr/bin/python3 -c “import setuptools, tokenize;file=‘/tmp/pip-build-xyshcxmw/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-zax35q8p-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_ext
checking for getifaddrs…not found.
checking for getnameinfo…not found.
checking for socket IOCTLs…not found.
checking for optional header files…none found.
checking whether struct sockaddr has a length field…no.
checking which sockaddr_xxx structs are defined…none!
checking for routing socket support…no.
checking for sysctl(CTL_NET…) support…no.
checking for netlink support…no.
building ‘netifaces’ extension
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DNETIFACES_VERSION=0.10.4 -I/usr/include/python3.4m -c netifaces.c -o build/temp.linux-x86_64-3.4/netifaces.o
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
error: command ‘gcc’ failed with exit status 1

----------------------------------------

Command “/usr/bin/python3 -c “import setuptools, tokenize;file=‘/tmp/pip-build-xyshcxmw/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-zax35q8p-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-xyshcxmw/netifaces
[/code]

  1. Tried upgrading pip…

[b]pip install --upgrade pip[/b] You are using pip version 7.1.0, however version 8.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting pip Downloading pip-8.0.3-py2.py3-none-any.whl (1.2MB) 100% |████████████████████████████████| 1.2MB 172kB/s Installing collected packages: pip Found existing installation: pip 7.1.0 Uninstalling pip-7.1.0: Successfully uninstalled pip-7.1.0 Successfully installed pip-8.0.3

  1. now I lost pip3 ?

[b]pip3 install --user netdisco==0.5.2[/b] -bash: /usr/bin/pip3: No such file or directory

  1. tried with pip (same error)

[code]pip install --user netdisco==0.5.2
Collecting netdisco==0.5.2
Using cached netdisco-0.5.2-py2.py3-none-any.whl
Collecting requests>=2.0 (from netdisco==0.5.2)
Using cached requests-2.9.1-py2.py3-none-any.whl
Collecting zeroconf>=0.17.4 (from netdisco==0.5.2)
Using cached zeroconf-0.17.4-py2.py3-none-any.whl
Collecting netifaces (from zeroconf>=0.17.4->netdisco==0.5.2)
Using cached netifaces-0.10.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/site-packages (from zeroconf>=0.17.4->netdisco==0.5.2)
Collecting enum-compat (from zeroconf>=0.17.4->netdisco==0.5.2)
Using cached enum-compat-0.0.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/lib/python2.7/site-packages (from enum-compat->zeroconf>=0.17.4->netdisco==0.5.2)
Installing collected packages: requests, netifaces, enum-compat, zeroconf, netdisco
Running setup.py install for netifaces … error
Complete output from command /usr/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-hxHuDf/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-1aXnjQ-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_ext
checking for getifaddrs…not found.
checking for getnameinfo…not found.
checking for socket IOCTLs…not found.
checking for optional header files…none found.
checking whether struct sockaddr has a length field…no.
checking which sockaddr_xxx structs are defined…none!
checking for routing socket support…no.
checking for sysctl(CTL_NET…) support…no.
checking for netlink support…no.
building ‘netifaces’ extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DNETIFACES_VERSION=0.10.4 -I/usr/include/python2.7 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
error: command ‘gcc’ failed with exit status 1

----------------------------------------

Command “/usr/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-hxHuDf/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-1aXnjQ-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-hxHuDf/netifaces
[/code]

So here you go… new to python so I stopped there and asking for guidance!

Thanks,

Simon

By default Fedora ships no compiler. You need gcc according to your output.

$ sudo dnf -y install gcc

gcc is/was there:

[root@localhost ~]# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC)

According to output…

gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
error: command 'gcc' failed with exit status 1

The error is with a missing lib : /usr/lib/rpm/redhat/redhat-hardened-cc1

Seems to be a known error:

Following this last link… I installed those 2 packages:

  • dnf install patch
  • dnf install redhat-rpm-config

Now running pip again:

pip install --user netdisco==0.5.2

[code]Collecting netdisco==0.5.2
Using cached netdisco-0.5.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in ./.local/lib/python2.7/site-packages (from netdisco==0.5.2)
Collecting zeroconf>=0.17.4 (from netdisco==0.5.2)
Using cached zeroconf-0.17.4-py2.py3-none-any.whl
Collecting netifaces (from zeroconf>=0.17.4->netdisco==0.5.2)
Using cached netifaces-0.10.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/site-packages (from zeroconf>=0.17.4->netdisco==0.5.2)
Collecting enum-compat (from zeroconf>=0.17.4->netdisco==0.5.2)
Using cached enum-compat-0.0.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/lib/python2.7/site-packages (from enum-compat->zeroconf>=0.17.4->netdisco==0.5.2)
Installing collected packages: netifaces, enum-compat, zeroconf, netdisco
Running setup.py install for netifaces … error
Complete output from command /usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-build-a_ogpE/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-esDFFQ-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
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
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -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/usr/include/python2.7 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o
netifaces.c:1:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command ‘gcc’ failed with exit status 1

----------------------------------------

Command “/usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-build-a_ogpE/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-esDFFQ-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-a_ogpE/netifaces
[/code]

I have a new error:
netifaces.c:1:20: fatal error: Python.h: No such file or directory

Then following this post: stackoverflow.com/questions/2153 … -directory
I installed: python-dev

  • dnf install python-devel.x86_64

Tried pip again… no error!

Better results after a good night sleep… not trivial this install!

Ok after last compile… with pip, I got:
Successfully installed enum-compat-0.0.2 netdisco-0.5.2 netifaces-0.10.4 zeroconf-0.17.4

Now starting hass:

INFO:homeassistant.util.package:Attempting install of netdisco==0.5.2 Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-0pmfxxiz/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-o06_v9ff-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpsjrppb7q" failed with error code 1 in /tmp/pip-build-0pmfxxiz/netifaces ERROR:homeassistant.bootstrap:Not initializing discovery because could not install dependency netdisco==0.5.2

So even if I installed successfully netdisco, hass is trying to install it and fails!!!

What is wrong with this now? :unamused:

ok following another thread now: stackoverflow.com/questions/2479 … untu-12-04

I am stuck here:

[code][root@localhost ~]# pip3 install netifaces
You are using pip version 7.1.0, however version 8.0.3 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
Collecting netifaces
Using cached netifaces-0.10.4.tar.gz
Installing collected packages: netifaces
Running setup.py install for netifaces
Complete output from command /usr/bin/python3 -c “import setuptools, tokenize;file=’/tmp/pip-build-99i10bxd/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-frljbmfs-record/install-record.txt --single-version-externally-managed --compile:
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
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -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/usr/include/python3.4m -c netifaces.c -o build/temp.linux-x86_64-3.4/netifaces.o
netifaces.c:1:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command ‘gcc’ failed with exit status 1

----------------------------------------

Command “/usr/bin/python3 -c “import setuptools, tokenize;file=’/tmp/pip-build-99i10bxd/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-frljbmfs-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-99i10bxd/netifaces
[/code]

netifaces.c:1:20: fatal error: Python.h: No such file or directory

Stopping this debug for now! Going nuts!

Install python3 dev package. You installed python-dev which is for python2. Then you were able to install netdisco but for python2 only. Make sure you install with pip3 not pip. I think that should solve it.