Upgrade Fails form 0.58.1 to 0.59.2

Hi,

actually i cannot upgrade my homeassistant and appdeamon.
aiohttp throw some error:

–>
homeassistant@homeassistant:/home/dissi$ pip3 install --no-cache-dir --upgrade homeassistant
Collecting homeassistant
Downloading homeassistant-0.59.2-py2.py3-none-any.whl (7.6MB)
100% |████████████████████████████████| 7.6MB 11.3MB/s
Requirement already up-to-date: yarl==0.15.0 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: requests==2.18.4 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: typing<4,>=3 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: jinja2>=2.9.6 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: certifi>=2017.4.17 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Collecting aiohttp==2.3.5 (from homeassistant)
Downloading aiohttp-2.3.5-cp35-cp35m-manylinux1_x86_64.whl (648kB)
100% |████████████████████████████████| 655kB 9.7MB/s
Requirement already up-to-date: pytz>=2017.02 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: chardet==3.0.4 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: voluptuous==0.10.5 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: astral==1.4 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: pyyaml<4,>=3.11 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: async-timeout==2.0.0 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: pip>=8.0.3 in /home/homeassistant/.local/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: multidict>=2.0 in /home/homeassistant/.local/lib/python3.5/site-packages (from yarl==0.15.0->homeassistant)
Requirement already up-to-date: idna<2.7,>=2.5 in /home/homeassistant/.local/lib/python3.5/site-packages (from requests==2.18.4->homeassistant)
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in /home/homeassistant/.local/lib/python3.5/site-packages (from requests==2.18.4->homeassistant)
Requirement already up-to-date: MarkupSafe>=0.23 in /home/homeassistant/.local/lib/python3.5/site-packages (from jinja2>=2.9.6->homeassistant)
Installing collected packages: aiohttp, homeassistant
Found existing installation: aiohttp 2.3.2
Uninstalling aiohttp-2.3.2:
Successfully uninstalled aiohttp-2.3.2
Rolling back uninstall of aiohttp
Exception:
Traceback (most recent call last):
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/commands/install.py”, line 342, in run
prefix=options.prefix_path,
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/req/req_set.py”, line 784, in install
**kwargs
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/req/req_install.py”, line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/req/req_install.py”, line 1064, in move_wheel_files
isolated=self.isolated,
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/wheel.py”, line 345, in move_wheel_files
clobber(source, lib_dir, True)
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/wheel.py”, line 316, in clobber
ensure_dir(destdir)
File “/home/homeassistant/.local/lib/python3.5/site-packages/pip/utils/init.py”, line 83, in ensure_dir
os.makedirs(path)
File “/usr/lib/python3.5/os.py”, line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Keine Berechtigung: ‘/usr/local/lib/python3.5/dist-packages/aiohttp-2.3.5.dist-info’
<–

home assistant is running on a virtual debian 9 server with the user homeassistant.

Any ideas?

Thanks,
Sebastian

You are not running in a virtual environment, and you are not using sudo, so pip installs packages in

/home/homeassistant/.local/

However, this clashes with a system package at /usr/local/lib/python3.5/dist-packages/aiohttp-2.3.5

I think you can either create a virtual environment for HA, or install HA using root. If you don’t plan to use the VM for anything other than HA, it makes sense to install as root, but I’m not sure if sudo works with debian 9, so the exact commands are up to you.

hmm, you are right. There is only ha running on that vm. I’ve installed everthing as root. no it works, thanks

1 Like

This fixed it for me! Thanks @Dissi

1 Like