Could not install dependency netdisco

getting errors on startup, using git checkout:

INFO:homeassistant.util.package:Attempting install of netdisco==0.6.7
Command "C:\Miniconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\clach04\\AppData\\Local\\Temp\\pip-build-60cus39u\\netifaces\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n','\n'), __file__, 'exec'))" install --record C:\Users\clach04\AppData\Local\Temp\pip-sy_ft8ke-record\install-record.txt --single-version-externally-managed --compile --home=C:\Users\clach04\AppData\Local\Temp\tmpr5mv8qa7" failed with error code 1 in C:\Users\clach04\AppData\Local\Temp\pip-build-60cus39u\netifaces\ERROR:homeassistant.bootstrap:Not initializing discovery because could not install dependency netdisco==0.6.7

this happens each time which takes a number of seconds to run through and then eventually fail.

Any tips for either debugging this (I have no more error detail, I’ve not attempted a pip3 install) or marking netdisco for ignore? This is pretty minor but I’m brand new to playing with HA so pretty clueless.

First try to install netdisco manually with pip, possibly getting some more verbose error logging. You might be missing a build dependency for netifaces, looking at the log. This has been a topic a couple of times in the forum, so you can look at old posts also.

Thanks for the quick response, I wanted suggestions before trying the manual install.

So that definitely helped pin point the issue, but did not resolve :slight_smile:

C:\Users\clach04\py\home-assistant>pip install netdisco
Collecting netdisco
  Using cached netdisco-0.6.7-py2.py3-none-any.whl
Collecting netifaces>=0.10.0 (from netdisco)
  Using cached netifaces-0.10.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in c:\mi
niconda3\lib\site-packages (from netdisco)
Collecting zeroconf==0.17.5 (from netdisco)
  Using cached zeroconf-0.17.5-py2.py3-none-any.whl
Collecting enum-compat (from zeroconf==0.17.5->netdisco)
Collecting six (from zeroconf==0.17.5->netdisco)
  Using cached six-1.10.0-py2.py3-none-any.whl
Building wheels for collected packages: netifaces
  Running setup.py bdist_wheel for netifaces ... error
  Complete output from command C:\Miniconda3\python.exe -u -c "import setuptools
, tokenize;__file__='C:\\Users\\clach04\\AppData\\Local\\Temp\\pip-build-j3xqlk4
2\\netifaces\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).r
ead().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\clach04
\AppData\Local\Temp\tmpbmgncb5wpip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_ext
  building 'netifaces' extension
  error: Unable to find vcvarsall.bat

  ----------------------------------------
  Failed building wheel for netifaces
  Running setup.py clean for netifaces
Failed to build netifaces
Installing collected packages: netifaces, enum-compat, six, zeroconf, netdisco
  Running setup.py install for netifaces ... error
    Complete output from command C:\Miniconda3\python.exe -u -c "import setuptoo
ls, tokenize;__file__='C:\\Users\\clach04\\AppData\\Local\\Temp\\pip-build-j3xql
k42\\netifaces\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__)
.read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\cla
ch04\AppData\Local\Temp\pip-ctf51yxf-record\install-record.txt --single-version-
externally-managed --compile:
    running install
    running build
    running build_ext
    building 'netifaces' extension
    error: Unable to find vcvarsall.bat

    ----------------------------------------
Command "C:\Miniconda3\python.exe -u -c "import setuptools, tokenize;__file__='C
:\\Users\\clach04\\AppData\\Local\\Temp\\pip-build-j3xqlk42\\netifaces\\setup.py
';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --record C:\Users\clach04\AppData\Local\Temp\
pip-ctf51yxf-record\install-record.txt --single-version-externally-managed --com
pile" failed with error code 1 in C:\Users\clach04\AppData\Local\Temp\pip-build-
j3xqlk42\netifaces\
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

I’ll do some digging into older posts on netifaces (the upgrade suggestion
from pip sounds hopeful rather than convincing :wink:).

So digging into log above along with forum posts and docs. Main issue is Discovery component https://home-assistant.io/components/discovery/ is enabled by default and unless the correct C compiler (and dependencies, e.g. under Linux python-dev) is available pip install will fail.

Options:

  1. For Windows there are pre-built wheels for netifaces, see https://home-assistant.io/components/discovery/ for link.

  2. Disable Discovery, to do this edit the config file and comment out the discovery: line,
    e.g.:

    Discover some devices automatically

    #discovery:

Installing the pre-built binary is certainly easy but I went with #2.