Pip error (I think ) after upgrade

Hi there,

Wondering what might of caused this error and best to fix it.

I updated pip and now I have this error and cant even start HA UI.

android@localhost:~$ hass --open-ui Traceback (most recent call last): File “/usr/local/bin/hass”, line 11, in sys.exit(main()) File “/usr/local/lib/python3.5/dist-packages/homeassistant/main.py”, line 368, in main exitcode = setup_and_run_hass(config_dir, args) File “/usr/local/lib/python3.5/dist-packages/homeassistant/main.py”, line 247, in setup_and_run_hass from homeassistant import bootstrap File “/usr/local/lib/python3.5/dist-packages/homeassistant/bootstrap.py”, line 14, in from homeassistant import ( File “/usr/local/lib/python3.5/dist-packages/homeassistant/config_entries.py”, line 120, in from .setup import async_setup_component, async_process_deps_reqs File “/usr/local/lib/python3.5/dist-packages/homeassistant/setup.py”, line 9, in from homeassistant import requirements, core, loader, config as conf_util File “/usr/local/lib/python3.5/dist-packages/homeassistant/requirements.py”, line 7, in import homeassistant.util.package as pkg_util File “/usr/local/lib/python3.5/dist-packages/homeassistant/util/package.py”, line 10, in from pip.locations import running_under_virtualenv File “/usr/local/lib/python3.5/dist-packages/pip/init.py”, line 45, in from pip.vcs import git, mercurial, subversion, bazaar # noqa File “/usr/local/lib/python3.5/dist-packages/pip/vcs/mercurial.py”, line 9, in from pip.download import path_to_url File “/usr/local/lib/python3.5/dist-packages/pip/download.py”, line 40, in from pip._vendor import requests, six File “/usr/local/lib/python3.5/dist-packages/pip/vendor/requests/init.py”, line 98, in from . import packages File “/usr/local/lib/python3.5/dist-packages/pip/_vendor/requests/packages.py”, line 12, in sys.modules[‘pip._vendor.requests.packages.’ + mod] = sys.modules[“pip._vendor.” + mod] KeyError: ‘pip._vendor.urllib3.contrib’

Any ideas on this ? Sorry I am little lost right now.

Just had the same issue working with Zappa. This seems to be an issue with pip 9.0.2, try downgrading pip to 9.0.1

pip install pip==9.0.1

https://github.com/pypa/pip/issues/5081

2 Likes

just register to say thank you to pemontto! thank u very much!

1 Like

Version 9.0.3 has fixed this issue so you can update without worrying. Though it’s a temporary situation as version 10 won’t support importing pip in code.