Unable to install python_openzwave with Hassbian 0.47.1

Hello, I am trying to connect a z-wave motion sensor to Home Assistant
I added GoConrol Z-Wave / Zigbee stick. zha component loads ok, but zwave gives this error:

Unable to install package python_openzwave==0.4.0.31: Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-y1gi7e4j/python-openzwave/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-l7m235sj-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.4/python-openzwave --home=/tmp/tmpfjscxw15" failed with error code 1 in /tmp/pip-build-y1gi7e4j/python-openzwave/

I am not sure where to go from here. New Hassbian install with not much added. I ran sudo apt-get upgrade etc but HA fails each start and attempts to reinstall with the same error.

python_openzwave was intergrated after 0.46, there’s no need to install. Just add zwave config in your configuration.yaml file, then restart HASS.

ps: It will be taken more than 15 minutes to install python-openzwave automatically, you can refresh the HASS webpage every 5 minute, if it ready to boot, the Z-wave config tab will show, pls be patient

Yes that is what I did. When I restart HASS I wait and this is the error it gives me

I’m having the same problem on my linux mint machine. I set up HASS like this: https://home-assistant.io/docs/installation/virtualenv/

This is the error I see in the HASS logs:
ERROR (Thread-10) [homeassistant.util.package] Unable to install package python_openzwave==0.4.0.31: Command “/srv/homeassistant/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-el4inqnl/python-openzwave/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-rskhz4e4-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.5/python-openzwave” failed with error code 1 in /tmp/pip-build-el4inqnl/python-openzwave/ 2017-09-14 18:34:21 ERROR (MainThread) [homeassistant.setup] Not initializing zwave because could not install dependency python_openzwave==0.4.0.31 2017-09-14 18:34:21 ERROR (MainThread) [homeassistant.setup] Setup failed for zwave: Could not install all requirements.

I also tried installing open zwave manually by using the command:
pip install python_openzwave==0.4.0.3

But I get this error:
Command “/usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-build-pvq8ZN/python-openzwave/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-crZB1h-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-pvq8ZN/python-openzwave/

I never did get this to work on my Linux Mint box. I installed Hasbian on my RaspberryPi, and zwave works now.

I figured it out on my own Mint Linux install - the issue is that g++ does not come preinstalled. You need to run the following command:

sudo apt-get install g++