Upgrade to 0.34 fails

I get the following error when trying to upgrade to the latest version von 0.33.4

Exception:

Traceback (most recent call last):
      File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
        status = self.run(options, args)
      File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/commands/install.py", line 342, in run
        prefix=options.prefix_path,
      File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 784, in install
        **kwargs
      File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/req/req_install.py", line 851, in install
        self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
      File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
        isolated=self.isolated,
      File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/wheel.py", line 345, in move_wheel_files
        clobber(source, lib_dir, True)
      File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/wheel.py", line 323, in clobber
        shutil.copyfile(srcfile, destfile)
      File "/srv/hass/hass_venv/lib/python3.4/shutil.py", line 108, in copyfile
        with open(dst, 'wb') as fdst:
    PermissionError: [Errno 13] Permission denied: '/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/remote/demo.py'

Any ideas?

Wrong user or not inside the venv.

it is weird because i always did the upgrade that way and never had a problem.
All in one script installation> then i type >

  1. sudo su -s /bin/bash hass
  2. source /srv/hass/hass_venv/bin/activate
  3. pip3 install --upgrade homeassistant

I dont get what the problem might be

I have been getting similar permissions issues on upgrades. I’ve fixed some by granting more permissions to the homeassistant user. This is a system that started with a Hassbian image

1 Like

How did you do that? Sorry but i am a noob in that field

If it’s struggling with access to a file or directory then check it with

ls -l /srv/hass…

If the appropriate user does not have permissions to write there then use something like

sudo chmod 666

The exact flags will depend on the file.

I’m having a different issue with the current upgrade. I’ll start a new thread for that

I’ve tried a few times since this to upgrade and still no luck. Just trying 0.37. It got a permissions error. I changed the permissions, but it still fails. Any ideas?

Installing collected packages: six, pyparsing, packaging, setuptools, voluptuous, jinja2, requests, homeassistant
  Found existing installation: six 1.8.0
    Uninstalling six-1.8.0:
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.4/shutil.py", line 522, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/six.cpython-34.pyc' -> '/tmp/pip-n5r0hnuv-uninstall/usr/lib/python3/dist-packages/__pycache__/six.cpython-34.pyc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.4/dist-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/usr/local/lib/python3.4/dist-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python3.4/shutil.py", line 535, in move
    os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/six.cpython-34.pyc'
homeassistant@raspberrypi:~ $ ls -l /usr/lib/python3/dist-packages/__pycache__
total 124
-rw-rw-rw- 1 root root   285 Sep 26 20:17 easy_install.cpython-34.pyc
-rw-rw-rw- 1 root root 98052 Sep 26 20:16 pkg_resources.cpython-34.pyc
-rw-rw-rw- 1 root root 23991 Sep 26 20:16 six.cpython-34.pyc
homeassistant@raspberrypi:~ $