Hass Update error 0.44.2 PermissionError

Trying to do the latest update from 0.43.1 to latest via pip3 install --upgrade homeassistant

I’m getting it failing (rebooted and tried several times)

here’s the errors

Exception:

  Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
        status = self.run(options, args)
      File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 295, in run
        requirement_set.install(install_options, global_options, root=options.root_path)
      File "/usr/lib/python3/dist-packages/pip/req.py", line 1436, in install
        requirement.install(install_options, global_options, *args, **kwargs)
      File "/usr/lib/python3/dist-packages/pip/req.py", line 672, in install
        self.move_wheel_files(self.source_dir, root=root)
      File "/usr/lib/python3/dist-packages/pip/req.py", line 902, in move_wheel_files
        pycompile=self.pycompile,
      File "/usr/lib/python3/dist-packages/pip/wheel.py", line 214, in move_wheel_files
        clobber(source, lib_dir, True)
      File "/usr/lib/python3/dist-packages/pip/wheel.py", line 204, in clobber
        os.makedirs(destdir)
      File "/usr/lib/python3.4/os.py", line 237, in makedirs
        mkdir(name, mode)
    PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/homeassistant'

Storing debug log for failure in /home/homeassistant/.pip/pip.log

Can anyone offer any help? or shall I do a fresh install

So I’m blind,

Its not going into the virtual environment when I type the command into the shell

source /srv/homeassistant/homeassistant_venv/bin/activate

homeassistant@hassbian:/home/pi $ source /srv/homeassistant/homeassistant_venv/bin/activate
bash: /srv/homeassistant/homeassistant_venv/bin/activate: No such file or directory

As taken from the Hassbian upgrade guide
Change to virtual enviroment source /srv/homeassistant/homeassistant_venv/bin/activate

Ok well, I feel ashamed now.

I used the AIO for original install, and was trying to use the commands on the AIO web page to do the upgrade.https://home-assistant.io/docs/installation/raspberry-pi-all-in-one/

Upgrading

To upgrade the All-In-One setup manually:

Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
Change to homeassistant user sudo su -s /bin/bash homeassistant
Change to virtual enviroment source /srv/homeassistant/homeassistant_venv/bin/activate
Update HA pip3 install --upgrade homeassistant
Type exit to logout the hass user and return to the pi user.

This fails as mentioned above.

Using the commands on the Hassbian common tasks page worked fine
https://home-assistant.io/docs/hassbian/common-tasks/#update-home-assistant

Update Home Assistant

Log in as the pi account and execute the following commands:

sudo systemctl stop [email protected]
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
exit
sudo systemctl start [email protected]

Yes, I try this, all times I do the same procedure, but…:

sudo systemctl stop [email protected] 
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant

At this point, I get this exception:

...
...
Collecting yarl<0.11,>=0.10.0 (from aiohttp==2.0.7->homeassistant)
  Using cached yarl-0.10.2.tar.gz
Requirement already up-to-date: MarkupSafe>=0.23 in /srv/homeassistant/lib/python3.4/site-packages (from jinja2>=2.9.5->homeassistant)
Installing collected packages: requests, homeassistant, multidict, yarl
  Found existing installation: requests 2.14.1
    Uninstalling requests-2.14.1:
      Successfully uninstalled requests-2.14.1
  Found existing installation: homeassistant 0.43.2
    Uninstalling homeassistant-0.43.2:
      Successfully uninstalled homeassistant-0.43.2
  Rolling back uninstall of homeassistant
Exception:
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args)
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/commands/install.py", line 342, in prefix=options.prefix_path,
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_set.py", line 784, in **kwargs
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_install.py", line 851, in self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_install.py", line 1064, in isolated=self.isolated,
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/wheel.py", line 345, in  clobber(source, lib_dir, True)
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/wheel.py", line 329, in os.utime(destfile, (st.st_atime, st.st_mtime))
PermissionError: [Errno 1] Operation not permitted

I can’t update Home Assistant…