Unable to install package python_openzwave==0.4.3

After upgrade to 0.63.0 I get these errors…

2018-02-11 10:54:46 ERROR (Thread-16) [homeassistant.util.package] Unable to install package python_openzwave==0.4.3: Command “python setup.py egg_info” failed
with error code 1 in /tmp/pip-build-zeebuos1/python-openzwave/
2018-02-11 10:54:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1518342886.946165, exception=, source=util/package.py, message=Unable to install package python_openzwave==0.4.3: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-zeebuos1/python-openzwave/, level=ERROR>
2018-02-11 10:54:46 ERROR (MainThread) [homeassistant.requirements] Not initializing zwave because could not install requirement python_openzwave==0.4.3
2018-02-11 10:54:46 ERROR (MainThread) [homeassistant.setup] Setup failed for zwave: Could not install all requirements.
2018-02-11 10:54:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1518342886.9474702, exception=, source=requirements.py, message=Not initializing zwave because could not install requirement python_openzwave==0.4.3, level=ERROR>
2018-02-11 10:54:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1518342886.9480093, exception=, source=setup.py, message=Setup failed for zwave: Could not install all requirements., level=ERROR>
2018-02-11 10:54:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=140719484149096-11, service=create, service_data=title=Invalid config, notification_id=invalid_config, message=The following components and platforms could not be set up:

Please check your config., domain=persistent_notification>
2018-02-11 10:54:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=None, entity_id=persistent_notification.invalid_config, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

Possibly you’ve hit this bug where cython is now required.

As the user you run Home Assistant as, activate the virtual environment and then run

pip3 install cython

Then try restart Home Assistant.

1 Like

Tried that and then I run into the problem that python-openzwvae can’t find the openzwave-lib :frowning :frowning:

So for now I reverted to the previous version.

Thanks for this tip! I uninstalled python_openzwave, installed cython, and then re-installed python_openzwave and things are working fine again on 0.63. This is using a Python 3 virtualenv on ubuntu 16.04.3 LTS

1 Like

Firstly thank you for the tips; but for some reason it does not work for me. I’m still experiencing the same issue once upgraded to 0.63. Im using HA on ubuntu 16.04 with virtual environment enable.

The permission denied error suggests that at some point you’ve used the wrong account.

You need to ensure that all files under /srv/homeassistant are owned by the right user, and then run the commands as that user. For example, if you run HA as homeassistant, then run this as an account with sudo access:

sudo chown -R homeassistant /srv/homeassistant
1 Like

Thank you for the quick answer. I thought i did, but ill double check that

You also need the libudev-dev OS package installed (sudo apt-get install libudev-dev) for python_openzwave==0.4.3. I finally managed to scroll back far enough to see an error about libudev.h missing.

You guys, are the best. It was a permission issue. Thanks a million

1 Like

After installing libudev-dev, I also had to pip uninstall python-openzwave and then remove the pip cache folder at ~/.cache/pip/ before it would install properly.

Ha! I’m going to try that as well.

got also a problem installing. I’m on python 3.6 and got this error:

running install_lib
creating /usr/local/lib/python3.5/dist-packages/pyximport
error: could not create ‘/usr/local/lib/python3.5/distpackages/pyximport’: Permission denied

Did you install Home Assistant inside a virtual environment (for example, you’re using Hassbian). If so, you forgot to activate the venv.

My bad thought I logged in into the virtual env. I installed cython and the libdev and the manual installed open-zwave. Still got a config error:

2018-03-25 20:34:41 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=50 from 2018-03-25 18:28:42.059852)
2018-03-25 20:34:52 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package python_openzwave==0.4.3: Exception:
Traceback (most recent call last):
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/commands/install.py”, line 324, in run
requirement_set.prepare_files(finder)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/req/req_set.py”, line 487, in _prepare_file
req_to_install, finder)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/req/req_set.py”, line 428, in _check_skip_installed
req_to_install, upgrade_allowed)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 568, in _get_pages
page = self._get_page(location)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 792, in get_page
“Cache-Control”: “max-age=600”,
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py”, line 521, in get
return self.request(‘GET’, url, **kwargs)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/download.py”, line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py”, line 508, in request
resp = self.send(prep, **send_kwargs)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py”, line 618, in send
r = adapter.send(request, **kwargs)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py”, line 37, in send
cached_response = self.controller.cached_request(request)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/_vendor/cachecontrol/controller.py”, line 111, in cached_request
resp = self.serializer.loads(request, cache_data)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/_vendor/cachecontrol/serialize.py”, line 114, in loads
return getattr(self, “_loads_v{0}”.format(ver))(request, data)
File “/home/ha/homeassistant/lib/python3.6/site-packages/pip/_vendor/cachecontrol/serialize.py”, line 176, in _loads_v2
cached = json.loads(zlib.decompress(data).decode(“utf8”))
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
2018-03-25 20:34:52 ERROR (MainThread) [homeassistant.requirements] Not initializing zwave because could not install requirement python_openzwave==0.4.3
2018-03-25 20:34:52 ERROR (MainThread) [homeassistant.setup] Setup failed for zwave: Could not install all requirements.

I looked at the dist packages dir in python and could not find the openzwave folder. But the installer said succesfull?

What file is HA looking for, there are several config directories.

My zwave is located on a different place after install (home\ha\lib…) . I use a orange opi zero and armbian.

For some reason I had a lot of trouble installing openzwave.
On ubuntu 18.04 LTS (I upgraded from 16.04 LTS)
Python 3.6
Installing in a virtualenv

after activating the virtualenv:

sudo apt-get install --force-yes -y make libudev-dev g++ libyaml-dev libdpkg-perl python3.6-dev

Why I was missing so many dependencies I have no idea but maybe this will help someone.

fyi: activating a virtualenv and apt-get are sort of unconnected. apt always installs global and the whole point of a virtualenv is that it’s local (but does inherit global)

So doing the apt-get install without activating the virtualenv would have the same result.

Correct, activating the virtualenv to install packages is not necessary. Thanks.

For what it’s worth, I had to do the same exact command again when I just updated python-openzwave from 0.4.x to 0.4.10 . I do a lot of package cleanup like apt-get autoremove and I haven’t spent time investigating but I assume that it removes at least one of the packages that I need. The README is helpful as well: http://openzwave.github.io/python-openzwave/README.html