Error after upgrading to python 3.6

I keep getting an error when starting up hass and now my zwave is not working. here is the error:

2017-11-21 00:06:54 ERROR (SyncWorker_10) [homeassistant.util.package] Unable to install package python_openzwave==0.4.0.35: Command "/usr/local/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-enquk6uo/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-bykaxy4_-record/install-record.txt --single-version-externally-managed --prefix  --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-enquk6uo/python-openzwave/
2017-11-21 00:06:54 ERROR (MainThread) [homeassistant.setup] Not initializing zwave because could not install dependency python_openzwave==0.4.0.35

any ideas? this worked prior to the upgrade.

That usually indicates a permissions error. Check that all the files and folders in your virtual environment are owned by the user account you’re running Home Assistant as. For example:

find /srv/homeassitant -user ! homeassistant -print

There are likely to be other lines in the log that provide more information than just those 2 error lines.

i just restored from a previous backup and am gonna retry again. What should my order be in the upgrade process:

A. Update HASS
B. Update Raspbian OS
C. Update python to 3.6

  1. Upgrade Raspbian
  2. Install Python 3.6
  3. Create the new virtual environment with Python 3.6

thanks @Tinkerer i will try that!