Home Assistant on Debian Stretch

Hi all,

I’m installing Home Assistant on a fresh install of Debian 9 (Stretch), using the Virtualenv method (following the advanced guide in https://home-assistant.io/docs/installation/virtualenv/). After the command “pip3 install --upgrade homeassistant”, i see the following errors:
(homeassistant) homeassistant@deb-stretch:/home/tom$ pip3 install --upgrade homeassistant
Collecting homeassistant
Downloading homeassistant-0.59.2-py2.py3-none-any.whl (7.6MB)
100% |████████████████████████████████| 7.6MB 181kB/s
Collecting async-timeout==2.0.0 (from homeassistant)
Downloading async_timeout-2.0.0-py3-none-any.whl
Collecting astral==1.4 (from homeassistant)
Downloading astral-1.4-py2.py3-none-any.whl
Collecting aiohttp==2.3.5 (from homeassistant)
Downloading aiohttp-2.3.5-cp35-cp35m-manylinux1_x86_64.whl (648kB)
100% |████████████████████████████████| 655kB 2.2MB/s
Collecting typing<4,>=3 (from homeassistant)
Downloading typing-3.6.2-py3-none-any.whl
Collecting yarl==0.15.0 (from homeassistant)
Downloading yarl-0.15.0-cp35-cp35m-manylinux1_x86_64.whl (157kB)
100% |████████████████████████████████| 163kB 7.0MB/s
Collecting pyyaml<4,>=3.11 (from homeassistant)
Downloading PyYAML-3.12.tar.gz (253kB)
100% |████████████████████████████████| 256kB 5.0MB/s
Requirement already up-to-date: pip>=8.0.3 in /srv/homeassistant/lib/python3.5/site-packages (from homeassistant)
Collecting pytz>=2017.02 (from homeassistant)
Downloading pytz-2017.3-py2.py3-none-any.whl (511kB)
100% |████████████████████████████████| 512kB 2.0MB/s
Collecting requests==2.18.4 (from homeassistant)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 9.2MB/s
Collecting certifi>=2017.4.17 (from homeassistant)
Downloading certifi-2017.11.5-py2.py3-none-any.whl (330kB)
100% |████████████████████████████████| 337kB 4.0MB/s
Collecting chardet==3.0.4 (from homeassistant)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 7.6MB/s
Collecting voluptuous==0.10.5 (from homeassistant)
Downloading voluptuous-0.10.5.tar.gz (41kB)
100% |████████████████████████████████| 51kB 11.6MB/s
Collecting jinja2>=2.9.6 (from homeassistant)
Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)
100% |████████████████████████████████| 133kB 8.2MB/s
Collecting multidict>=3.0.0 (from aiohttp==2.3.5->homeassistant)
Downloading multidict-3.3.2-cp35-cp35m-manylinux1_x86_64.whl (441kB)
100% |████████████████████████████████| 450kB 3.1MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests==2.18.4->homeassistant)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |████████████████████████████████| 133kB 8.3MB/s
Collecting idna<2.7,>=2.5 (from requests==2.18.4->homeassistant)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 9.9MB/s
Collecting MarkupSafe>=0.23 (from jinja2>=2.9.6->homeassistant)
Downloading MarkupSafe-1.0.tar.gz
Building wheels for collected packages: pyyaml, voluptuous, MarkupSafe
Running setup.py bdist_wheel for pyyaml … error
Complete output from command /srv/homeassistant/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-ol0tcup9/pyyaml/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/tmpe52w5jn_pip-wheel- --python-tag cp35:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …]
or: -c --help [cmd1 cmd2 …]
or: -c --help-commands
or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for pyyaml
  Running setup.py clean for pyyaml
  Running setup.py bdist_wheel for voluptuous ... error
  Complete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ol0tcup9/voluptuous/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpvi850p2upip-wheel- --python-tag cp35:
  WARNING: Could not locate pandoc, using Markdown long_description.
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for voluptuous
  Running setup.py clean for voluptuous
  Running setup.py bdist_wheel for MarkupSafe ... error
  Complete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ol0tcup9/MarkupSafe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpe23gmmccpip-wheel- --python-tag cp35:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for MarkupSafe
  Running setup.py clean for MarkupSafe
Failed to build pyyaml voluptuous MarkupSafe
Installing collected packages: async-timeout, pytz, astral, multidict, chardet, yarl, aiohttp, typing, pyyaml, urllib3, certifi, idna, requests, voluptuous, MarkupSafe, jinja2, homeassistant
Exception:
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/srv/homeassistant/lib/python3.5/site-packages/pip/commands/install.py", line 360, in run
    prefix=options.prefix_path,
  File "/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/srv/homeassistant/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 "/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/srv/homeassistant/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/srv/homeassistant/lib/python3.5/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/srv/homeassistant/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] Permission denied: '/srv/homeassistant/lib/python3.5/site-packages/async_timeout-2.0.0.dist-info'

I allready dit a pip3 install wheel, but that doesn’t solve the problem. The python version that is installed, is 3.5.2, pip version is 9.0.1.

Does someone know wat’s going on?

I would suggest you upgrade to at least Python 3.5.3, since I believe that will become the new minimum version of Python in the new year.

PermissionError: [Errno 13] Permission denied: '/srv/homeassistant/lib/python3.5/site-packages/async_timeout-2.0.0.dist-info'

I suspect that if you do ls -ald /srv/homeassistant/lib/python3.5/site-packages/ you’ll see that it’s not owned by the user homeassistant but by root, in which case:

sudo chown -R homeassistant:homeassistant /srv/homeassistant
1 Like

I just did this on Ubuntu 16.04 which is basically debian stretch. I saw the same wheel errors but they didn’t affect anything. I didn’t have any permission issues. Here’s the detailed instructions of what I did: Home Assistant Fresh on Ubuntu 16.04 server