I just updated to HA 0.90 and wanted to use the native androidtv component with my FireTv Stick. However, after adding the configuration in my yaml file:
2019-03-24 11:04:43 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package androidtv==0.0.12: Failed building wheel for pycryptodome
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.8.0 which is incompatible.
pyrebase4 4.3.0 has requirement oauth2client==4.1.2, but you'll have oauth2client 4.0.0 which is incompatible.
broadlink 0.9 has requirement pycryptodome==3.4.11, but you'll have pycryptodome 3.8.0 which is incompatible.
Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-vme9kee3/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ge7nkf6m/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-vme9kee3/pycryptodome/
You are using pip version 19.0.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2019-03-24 11:04:43 ERROR (MainThread) [homeassistant.requirements] Not initializing androidtv.media_player because could not install requirement androidtv==0.0.12
2019-03-24 11:04:43 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform androidtv.media_player: Could not install all requirements.
I’m on Hassio using HA 0.90 and using the ADB - Android Debug Bridge Addon which connects just fine with my FireTV.
okay, did this. However, this only brought me 2 more lines of “errors”: 2019-03-25 17:02:07 WARNING (MainThread) [homeassistant.loader] You are using a custom component for androidtv which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-25 17:02:07 WARNING (MainThread) [homeassistant.loader] You are using a custom component for androidtv.media_player which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.*
2019-03-25 17:03:17 ERROR (SyncWorker_8) [homeassistant.util.package] Unable to install package androidtv==0.0.13: Failed building wheel for pycryptodome*
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you’ll have pycryptodome 3.8.0 which is incompatible.*
pyrebase4 4.3.0 has requirement oauth2client==4.1.2, but you’ll have oauth2client 4.0.0 which is incompatible.*
broadlink 0.9 has requirement pycryptodome==3.4.11, but you’ll have pycryptodome 3.8.0 which is incompatible.*
You are using pip version 19.0.2, however version 19.0.3 is available.*
You should consider upgrading via the ‘pip install --upgrade pip’ command.*
2019-03-25 17:03:17 ERROR (MainThread) [homeassistant.requirements] Not initializing androidtv.media_player because could not install requirement androidtv==0.0.13*
2019-03-25 17:03:17 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform androidtv.media_player: Could not install all requirements.*
All I can think of is to install androidtv into a temporary folder on a different machine and copy the files to config/lib/python3.x/site-packages (fill in the path accordingly).
To install androidtv into the current folder, run pip3 install androidtv --target .
For the record, I’m getting the exact same errors as @capstan1, with and without the files in custom_components. I’m running home assistant in a docker container on a ubuntu 18.04 box.
I’m just playing around with pip3 install in a different directory now…
2019-03-26 20:11:03 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package androidtv==0.0.13: Failed building wheel for pycryptodome
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.8.0 which is incompatible.
pyrebase4 4.3.0 has requirement oauth2client==4.1.2, but you'll have oauth2client 4.0.0 which is incompatible.
broadlink 0.9 has requirement pycryptodome==3.4.11, but you'll have pycryptodome 3.8.0 which is incompatible.
Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-acu14z3j/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read()
.replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-93lpvtpg/install-record.txt --single-version-externally-managed --prefix --co
mpile --user --prefix=" failed with error code 1 in /tmp/pip-install-acu14z3j/pycryptodome/
You are using pip version 19.0.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2019-03-26 20:11:03 ERROR (MainThread) [homeassistant.requirements] Not initializing androidtv.media_player because could not install requirement androidtv==0.0.13
2019-03-26 20:11:03 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform androidtv.media_player: Could not install all requirements.
Just to check, my homeassistant container sees this:
I’m out of my depth here, but I think androidtv wants pycryptodome 3.8.0, and something else wants python-jose-pycryptodome, which wants pycryptodome 3.3.X. I guess I’ll see if I can figure out what that might be.
First of all, as far as I understand, when using it as a custom component it should look for its dependencies in the deps folder of your configuration directory, so versions of packages installed elsewhere shouldn’t matter. Although maybe it still prioritizes HA’s import path before the deps/lib/python3.7/site-packages path…
Second, there was a pull request a while back about pycryptodome and how versions prior to 3.6.6 should not be allowed. I don’t know why androidtv installs successfully for some users and not others, but perhaps it’s worth creating an issue about this. For reference:
One thing that came to my mind, that maybe could cause the issue:
Before trying to use androidtv I had to do a fresh install of Hassio. This probably installed 0.90 or 0.89.
I then restored my previous snapshot done using 0.88.2. I updated to 0.90 and tried the native component.
However, I found that around 0.88 (give or take), HA’s handling of dependencies for custom components changed. Whereas it used to install them for me, I now had to install them myself by copying over the files from elsewhere. I don’t know if that’s related.
Anyways, this issue has me stumped. It says it failed to install androidtv, but if you did the aforementioned steps correctly then it shouldn’t need to install it – it’s right there, in the deps folder! All I can suggest is to make sure that all your paths are correct and that the custom component is being loaded. Try adding _LOGGER.critical("I am here!") statements to the custom component. You could add import androidtv and _LOGGER.critical(androidtv.__file__) to see where it imported androidtv from, and you could do the same for other packages.
I might be able to remove the pycryptodome requirement. I think that would fix it.
@JeffLirion, Can you confirm where the deps directory should be, from inside the docker container? Your earlier message made me think it should be /config/lib/python3.7/site-packages, but now you’ve said deps, I’m wondering if it should really be /config/deps/lib/python3.7/site-packages?