ha-google-home: Setup failed for google_home: Requirements for google_home not found: ['glocaltokens==0.4.0']

Updated both HA Core and Google Home HA integration and it can no longer boot due to Setup failed for google_home: Requirements for google_home not found: [‘glocaltokens==0.4.0’]

Tried to install it manually via pip inside the container but Alpine doesn’t include ‘cc’, so it can’t compile grpcio-tools package.

Version of the integration

If you are unsure about the version check the github release here.

1.7.0

Home assistant version: core-2021.9.0.dev20210820

Logs

bash-5.1# pip install glocaltokens==0.4.0
Collecting glocaltokens==0.4.0
  Using cached glocaltokens-0.4.0-py3-none-any.whl (36 kB)
Collecting zeroconf<0.30.0,>=0.28.8
  Using cached zeroconf-0.29.0-py3-none-any.whl (55 kB)
Collecting gpsoauth<2.0.0,>=1.0.0
  Downloading gpsoauth-1.0.0-py3-none-any.whl (6.4 kB)
Requirement already satisfied: grpcio==1.31.0 in /usr/local/lib/python3.9/site-packages (from glocaltokens==0.4.0) (1.31.0)
Requirement already satisfied: requests<3.0.0,>=2.25.1 in /usr/local/lib/python3.9/site-packages (from glocaltokens==0.4.0) (2.25.1)
Requirement already satisfied: simplejson<4.0.0,>=3.17.2 in /usr/local/lib/python3.9/site-packages (from glocaltokens==0.4.0) (3.17.3)
Collecting grpcio-tools==1.31.0
  Using cached grpcio-tools-1.31.0.tar.gz (2.1 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w3k_gg1z/grpcio-tools/setup.py'"'"'; __file__='"'"'/tmp/pip-install-w3k_gg1z/grpcio-tools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-qf1o69xp
         cwd: /tmp/pip-install-w3k_gg1z/grpcio-tools/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-w3k_gg1z/grpcio-tools/setup.py", line 112, in <module>
        if check_linker_need_libatomic():
      File "/tmp/pip-install-w3k_gg1z/grpcio-tools/setup.py", line 73, in check_linker_need_libatomic
        cc_test = subprocess.Popen(['cc', '-x', 'c++', '-std=c++11', '-'],
      File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'cc'

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (10 by maintainers)

Most upvoted comments

I believe this is the same issue I’m having with HA on docker ARM64. I followed these instructions which worked for me.

Do I understand this right, I have to do this every time the container is restarted?

No, just when you pull a new image (update)

We pinned version of grpcio, only newer versions come with wheels for arm.

I think it can be unpinned in HA but someone should test if issue they were having on rpi is not longer present with current version.

We should probably document this in readme. You need to install compiler (cc), installation process depends on your system.

In your case it’s probably apk install gcc but I’m not sure.

It seems it can’t install glocaltokens 0.5.2. Current version of the integration depends on 0.6.1. So you have the old version of the integration somewhere.

Edit: nope, we actually forgot to update it in manifest.json. @leikoilja can you fix it please?

It works for me just fine on x86 system. But I have some good news for you. 2022.2 finally upgraded grpcio version to 1.43.0 which includes wheels for arm devices and we can use it in glocaltokens. So you don’t need to compile it anymore.

@leikoilja can you upgrade it in glocaltokens and update the documentation that compilation is no longer needed?

2022.2 also drops support for Python 3.8. I think we should do that as well. @DurgNomis-drol are you interested in taking this one?

Updated to HA 2022.2 this morning and this is not working anymore: the wheel takes very long building (+30 minutes) with high CPU, then I get some errors and a rollback on grpcio. When I restart the container after that, it fails. Device.config keeps loading forever and Home Assistant never ends starting. Only solution I found so far is recreating the container. So without Google Home integration…

I’ll post some more logs later on. Anyone else experiencing this?

I can help with that if you like? It would be nice if we could these dependencies added to the ARM HA docker images tbh as it’s a bit of a pain having to do this every time we update.

Nice, happy to hear it worked out for you @joostvkempen. @Morphy99 thanks for the help. I guess we really need to add some lines to the README documentation with references to help ppl troubleshoot dependency issues like these 😃