Can't Update HA

I’m trying to upgrade out of version 58.1. “pip install --upgrade homeassistant” starts downloading some files, then errors with:

Using cached
Traceback (most recent call last):
File “c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip_vendor\”, line 2577, in _dep_map
return self._dep_map
File "c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2652, in getattr
raise AttributeError(attr)
AttributeError: _Distribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip\”, line 211, in main
status =, args)
File “c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\”, line 305, in run
File “c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip\”, line 705, in build
File “c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\”, line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File “c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\”, line 321, in walk_req_to_install
more_reqs = handler(req_to_install)
File “c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\”, line 561, in prepare_file
set(req_to_install.extras) - set(dist.extras)
File "c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2774, in extras
return [dep for dep in self.dep_map if dep]
File "c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2591, in dep_map
File "c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2924, in parse_requirements
“version spec”)
File "c:\users\admin.home.hoverscope\appdata\local\programs\python\python36-32\lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2900, in scan_list
raise RequirementParseError(msg, line, “at”, line[p:])
pip._vendor.pkg_resources.RequirementParseError: Expected ‘,’ or end-of-list inidna-ssl>=1.0; python_version<“3.7” at ; python_version<“3.7”
You are using pip version 7.1.2, however version 18.1 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.

I’m on Python 3.6.1, BTW.

Any idea what’s going on? Is PIP too far out of date? Problem is, when I try to upgrade it, I get other errors. Let me know if it would be relevant to post that error as well.

A little bit more info on the install method you’ve chosen might be helpful.

Seems like it’s installed on a Windows machine, right?

Sorry, yes it’s Windows. Let me know if there’s any other info you need.

Maybe you want to add this info in the title of your post so you an attract the right kind of interested readers.

I personally use it in a VEnv on a Pi3 so I can’t really give you any hints here, sorry.

That is a year out of date (which is a lifetime for HA). There have been a ton of changes (bi-weekly updates) and breaking changes.

You may be better off trying a fresh install. Grab your config files, fresh install, replace the config files and fight the resulting errors. I would #comment out the majority of your config and try to bring things back one by one. Sounds tedious but Im guessing your fighting an uphill battle also with getting an update from 5X.x to run.

1 Like

Alright, my only concern would be the old database. Do I just drop it in over the fresh install?

Ok, just tried a clean install, got the same exact error :frowning:

So I tried reinstalling Python, and even that is throwing errors. I think my Python install is the source of this mess, but I’m getting an error that “this installation is forbidden by system policy”. Install logs just say that some MSIs failed to execute. My Python installation is obviously completely messed up, but I really want to avoid reformatting my hard drive. Any suggestions on how to basically manually uninstall it?

Sorry to take the thread down a rabbit hole…

There was a database conversion sometime back, not sure if it will be compatible.

It auto converted when the change was made, not sure how it would be handled now.

Installation on windows has always been poorly supported.

I suggest you look at using docker to install HA on Windows. It keeps all the required elements in a self contained linux box, so you don’t need to worry about them.

Docker is useful tool otherwise, so i is worth the learning curve.

Thanks for everyone’s help and suggestions. I took the opportunity to try out Windows Server Core and was able to get HA set up on it without any trouble. I copied the config folder over after installing, before running. Then on its first run, HA performed the DB upgrade (which took quite a bit of time), and everything came up fine. Phew!