ha-google-home: Unable to install package glocaltokens==0.3.1
Describe the bug
Hi! I’m on Home Assistant 2021.7.1
and is unable to install the integration.
Version of the integration
If you are unsure about the version check the github release here.
1.5.0
Logs
Logger: homeassistant.util.package
Source: util/package.py:96
First occurred: 4.15.02 (2 occurrences)
Last logged: 4.16.05
Unable to install package glocaltokens==0.3.1: ERROR: Cannot install glocaltokens==0.3.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 18 (2 by maintainers)
Yes, that will execute everytime the container is restarted. Yes, it increases the boot time significantly.
@plangenhuizen you can try to activate the same virtualenv where HA is running and install
glocaltokens
manually (pip install glocaltokens==0.4.0
). You should get the same error with more details about where this conflict is coming from.After updating from 2021.7.0 to 2021.7.4 it installed without any problems for me.
That would be nice if it could be solved that way. For now I’m solving the issue by having the install in the container startup command
command: /bin/bash -c "apk add gcc g++; pip3 install --upgrade pip; pip3 install pymysql glocaltokens==0.3.1; /init"
I was not able to find any elaborative logs about the installation issue, however I tried @kuchel77s suggestion and installed gcc, g++ and glocaltokens manually.
I run Home Assistant Core in Docker, so after attatching to the container I ran the commands.
The integration didn’t fail to install afterwards.
If you have access to the command line of Home Assistant, do
apk add gcc
and
apk add g++
To add glocaltokens, it wants to build wheels grpcio-tools locally (rather than having binaries you can download already). It can’t be done if you don’t have a C or C++ compiler (gcc and g++) installed locally.
Then, you can install glocaltokens via
pip3 install glocaltokens
It takes a little bit to build it all, but it then should install it ok. It is now giving me a separate error but at least it solves the installation problem.
Just jumping in on this, I updated HA to 2021.7.4 and have been experiencing the same error in the log. I attempted to follow the instructions for more log data, but Logger: Set level (from the Service menu) does not seem to exist in my services list in Developer Tools.
Two different Log Entries Below:
Setup failed for google_home: Requirements for google_home not found: [‘glocaltokens==0.3.1’].
Unable to install package glocaltokens==0.3.1: ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-01sz4ztr/grpcio-tools/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-01sz4ztr/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-6jdhclu9 cwd: /tmp/pip-install-01sz4ztr/grpcio-tools/ Complete output (11 lines): Traceback (most recent call last): File “<string>”, line 1, in <module> File “/tmp/pip-install-01sz4ztr/grpcio-tools/setup.py”, line 112, in <module> if check_linker_need_libatomic(): File “/tmp/pip-install-01sz4ztr/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’ ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. WARNING: You are using pip version 20.2.4; however, version 21.1.3 is available. You should consider upgrading via the ‘/usr/local/bin/python3 -m pip install --upgrade pip’ command.