Core: Unable to install package home-assistant-frontend==20190626.0

Created on 5 Jul 2019  路  34Comments  路  Source: home-assistant/core

2019-07-05 18:25:55 INFO (Thread-18) [homeassistant.loader] Loaded homekit_controller from homeassistant.components.homekit_controller
2019-07-05 18:26:36 ERROR (Thread-17) [homeassistant.util.package] Unable to install package home-assistant-frontend==20190626.0: Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-j8z2l_gs/home-assistant-frontend/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-hud0orx7-record/install-record.txt --single-version-externally-managed --prefix  --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-j8z2l_gs/home-assistant-frontend/
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.requirements] Not initializing frontend because could not install requirement home-assistant-frontend==20190626.0
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not install all requirements.
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: frontend, logbook, map
2019-07-05 18:26:36 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.
2019-07-05 18:26:36 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 54.08s
2019-07-05 18:26:36 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2019-07-05 18:26:36 INFO (MainThread) [homeassistant.core] Timer:starting

my problem is Unable to install package home-assistant-frontend==20190626.0

stale

Most helpful comment

I had same issue, and installed manually.

All 34 comments

I have tried so many ways when I first time to install about other wrongs.
such as:
sudo apt-get install python-setuptools
(sudo apt-get install python3-setuptools) !!!
sudo apt-get install python-dev
sudo apt install python-pip
sudo pip install --upgrade setuptools
sudo apt-get install libhdf5-dev
pip install wheel

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-dev

sudo easy_install greenlet
sudo easy_install gevent

sudo apt-get install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev

Basic steps:
sudo apt-get install python3.5
sudo apt install python3-pip
python3 --version
pip3 --version
sudo pip3 install homeassistant
hass --open-ui

I had same issue, and installed manually.

thanks for reply
Could u tell me a little bit more about installed manually ?

You can install it manually via pip. Be sure to be in the corresponding virtual environment first (in a manual installation is through something like sudo -u homeassistant -H -s followed by source /srv/homeassistant/bin/activate).

python3 -m pip install home-assistant-frontend==20190626.0

That said, it would be interesting to know why this started failing. In my logs I see there's a mismatch for this package's hash:

19-07-05 19:09:29 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package home-assistant-frontend==20190626.0: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.                                          
    home-assistant-frontend==20190626.0 from https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl#sha256=424bfe6cce5464090225ac1c114b265d6681a99574e046cd299963556c1433b0 (from -c /srv/homeassistant/lib/python3.7/site-packages/homeassistant/package_constraints.txt (line 13)):                                                                                                                      
        Expected sha256 424bfe6cce5464090225ac1c114b265d6681a99574e046cd299963556c1433b0                                                                  
             Got        cb60c7adbe46ef2cbe0a2b0f8d824ad8e91863df46c3e96dae859483e600e10d   

I'm currently using Python 3.7 (but earlier today I had it working with 3.5 in other venv)

paysen@nanopineo2:~$ python3 -m pip install home-assistant-frontend==20190626.0
Collecting home-assistant-frontend==20190626.0
  Using cached https://files.pythonhosted.org/packages/30/58/dbe21b6b1172dcc2f56a4c4e64f17b2239d44345853d1b60db6fea63719f/home-assistant-frontend-20190626.0.tar.gz
Building wheels for collected packages: home-assistant-frontend
  Running setup.py bdist_wheel for home-assistant-frontend ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7buf6iti/home-assistant-frontend/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/tmpywuae81xpip-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 home-assistant-frontend
  Running setup.py clean for home-assistant-frontend
Failed to build home-assistant-frontend
Installing collected packages: home-assistant-frontend
  Running setup.py install for home-assistant-frontend ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7buf6iti/home-assistant-frontend/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-26nl4hc8-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:

@paysenyu as I said before, you need to be in the corresponding virtual environment first (in a manual installation is through something like sudo -u homeassistant -H -s followed by source /srv/homeassistant/bin/activate).

That command fails for you because you are running it as your user and not inside homeassistant's virtual environment.

@elamperti thanks

and I tried to follow this guide -
Create a virtual environment in your current directory:
$ python3 -m venv homeassistant
Open the virtual environment:
$ cd homeassistant
Activate the virtual environment:
$ source bin/activate
Install Home Assistant:
$ python3 -m pip install homeassistant
Run Home Assistant:
$ hass --open-ui

but still faced the same issue.

You have to install wheels first. Try following this official guide: https://www.home-assistant.io/docs/installation/raspberry-pi/

@eagleamon wow!
I tired following this official guide: https://www.home-assistant.io/docs/installation/raspberry-pi/
it works now.

thank you so much

I know this is closed, but I had the same issue. Caches are the bane of hass upgrades. Fixed by running rm -rf ~/.cache/pip/wheels

I too realise the bug is closed, but it seems to still be an issue with images downloaded today (20190708) Should add I'm very new to hassbian but have had a little Linux experience so may be wide of the mark.

Digging into the process a bit further - its seems that the actual download is quietly failing mid way along resulting in an incomplete package download. The package of course then fails the checksum test.

By manually downloading the package in question;

$ wget https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl

I was able to confirm the sha256sum to be correct;

$ sha256sum home_assistant_frontend-20190626.0-py3-none-any.whl
424bfe6cce5464090225ac1c114b265d6681a99574e046cd299963556c1433b0  home_assistant_frontend-20190626.0-py3-none-any.whl

and then to manually install with;

python3 -m pip install ./home_assistant_frontend-20190626.0-py3-none-any.whl

making sure I'd run these previously;

$ sudo service home-assistant@homeassistant stop
$ sudo -u homeassistant -H -s
$ source /srv/homeassistant/bin/activate

to ensure that hass wasn't running and to get into the correct environment etc.

Once the package installed, was able to exit to the pi user then start the service manually with

sudo service home-assistant@homeassistant stop

This -seems- to have got everything going, I hope this is of use.

@paysenyu can you reopen this issue? (you can then unsubscribe from notifications if not interested)

Of course.

Ran into the same problem after upgrading from 0.93 to 0.94.5. For me, the fix was to uninstall the front end module first and then reinstall it. The upgrade is problematic.

During startup after upgrading:

2019-07-08 15:07:12 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package home-assistant-frontend==20190626.0: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    home-assistant-frontend==20190626.0 from https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl#sha256=f35c8997b0db54d9d70899785952826b4265eae46eb0ee773bcd72e390e2876e (from -c /home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/lib/python3.6/site-packages/homeassistant/package_constraints.txt (line 13)):
        Expected sha256 f35c8997b0db54d9d70899785952826b4265eae46eb0ee773bcd72e390e2876e
             Got        7209a0e8da46c00fd4517d353cc055a70a434d38bc89410e905a30acd0d014f9

Then I tried to upgrade manually, skipping the cache, but that still failed with a different hash value:

(homeassistant-3.6.3) homeassistant@hasspi:~/.homeassistant$ pip install -U --no-cache-dir home-assistant-frontend==20190626.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting home-assistant-frontend==20190626.0
  Downloading https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl (25.7MB)
     |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅                      | 8.1MB 673kB/s eta 0:00:27
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    home-assistant-frontend==20190626.0 from https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl#sha256=f35c8997b0db54d9d70899785952826b4265eae46eb0ee773bcd72e390e2876e:
        Expected sha256 f35c8997b0db54d9d70899785952826b4265eae46eb0ee773bcd72e390e2876e
             Got        a8e35a1ad03df728a8cfbe91cd6dd7819076e641c59d35c5cd768467797d5310

Decided to uninstall it, then re-install. Uninstalling removes all of the existing files, I found a previous issue that was similar and the cause was related to existing files.

(homeassistant-3.6.3) homeassistant@hasspi:~/.homeassistant$ pip uninstall home-assistant-frontend
Uninstalling home-assistant-frontend-20190604.0:
  Would remove:
    /home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/lib/python3.6/site-packages/hass_frontend/*
    /home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/lib/python3.6/site-packages/home_assistant_frontend-20190604.0.dist-info/*
Proceed (y/n)? y
  Successfully uninstalled home-assistant-frontend-20190604.0
(homeassistant-3.6.3) homeassistant@hasspi:~/.homeassistant$ pip install --no-cache-dir home-assistant-frontend==20190626.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting home-assistant-frontend==20190626.0
  Downloading https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl (25.7MB)
     |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 25.7MB 749kB/s
Installing collected packages: home-assistant-frontend
Successfully installed home-assistant-frontend-20190626.0

I'm not having any luck with any of the above solutions.
Still says the hash needs to be updated.
Any other suggestions to get front end files installed?

(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip install --no-cache-dir home-assistant-frontend==20190626.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting home-assistant-frontend==20190626.0
  Downloading https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl (25.7MB)
    31% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅                      | 8.0MB 3.3MB/s eta 0:00:06
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    home-assistant-frontend==20190626.0 from https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190626.0-py3-none-any.whl#sha256=42e4d7d91d8d0f1217f251e15b257857e356a994b997c6e3d2a0d360d2e6258d:
        Expected sha256 42e4d7d91d8d0f1217f251e15b257857e356a994b997c6e3d2a0d360d2e6258d
             Got        501c679c7c0d11d013d3a3397285f546b11247921dcccec135c7d7462f440e16

Edit:
Found the following later dated front end files worked
pip install --no-cache-dir home-assistant-frontend==20190630.0

(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ pip install --no-cache-dir home-assistant-frontend==20190630.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting home-assistant-frontend==20190630.0
  Downloading https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20190630.0-py3-none-any.whl (25.9MB)
    100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 25.9MB 3.5MB/s
Installing collected packages: home-assistant-frontend
Successfully installed home-assistant-frontend-20190630.0

I ran into the same issue. None of the 0.95.x releases are currently installable.

Just another data point. I configured a brand new venv, installed HA and when it booted and attempted to install the frontend I got yet the same error. Installing it manually worked.

Followed the guide from @hughhalf and it worked perfectly. Thanks!

All of the logs here are using piwheels to download our package. I don't know what that is. By default, all packages should be downloaded from PyPI. I would think that this might be a bug with piwheels.

I believe piwheels is the default source on Raspberry Pi. Or it was at some point. My home assistant installation is from 2015 or so.

P.S. And now the upgrade was successful. Indeed it looks like Piwheels had a problem in their index, which is presumably fixed now.

Even the official documentation for manual installation says wheels should be installed

Edit: This is not related.

Even the official documentation for manual installation says wheels should be installed:

wheel is a python package. Piwheels.org is a python module repository with the modules built on and for Raspberry Pis. They are completely different things :-)

Sorry, I got confused. After visiting the home-assistant-frontend package in piwheels and pypi I got the idea that wheel was enabling that repository (it's not). My bad! Thanks for the clarification :slightly_smiling_face:

To resolve this issue, I manually installed from pypi:
pip install https://files.pythonhosted.org/packages/30/58/dbe21b6b1172dcc2f56a4c4e64f17b2239d44345853d1b60db6fea63719f/home-assistant-frontend-20190626.0.tar.gz

The problem is that the files aren't being properly setup on piwheels.org I guess (given the commentary above about pypi.) So the official documentation is broken at the moment. Also I had to use the 20190626 version. There are much newer releases posted but it didn't like them.

Several instances of the same problem being tracked here: https://github.com/bennuttall/piwheels/issues/185

Same problem today installing Hassbian. Just got 404 not found when trying to access http://ipaddress:8123. Had to install python-pip and then run sudo pip install --no-cache-dir home-assistant-frontend==20190630.0
Now everything works.

I've had this issue upon updating each version of 0.96.x and the webpage is never reachable, just a 404. However restarting HA, it then loads normally without issue.

2019-07-24 19:15:08 ERROR (SyncWorker_14) [homeassistant.util.package] Unable to install package home-assistant-frontend==20190721.1: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.

Same issue from 0.95.4 to 0.96.4, I had tyied following method, but the issue still appeared:

  1. download .whl from https://www.piwheels.org/simple/home-assistant-frontend/ and I had verified the sha256, installed manually by "python3 -m pip install ./home_assistant_frontend-20190721.1-py3-none-any.whl" .
  2. sudo pip install --nocache-dir home-assistant-frontend==20190721.1

anyone can help me?

Hello guys,
I have resoved this issue by:

sudo apt update
sudo apt upgrade -y
# Download home_assistant_frontend-20190721.1-py3-none-any.whl
sudo pip install home_assistant_frontend-20190721.1-py3-none-any.whl
sudo reboot
sudo rm -rf /usr/local/lib/python3.7/dist-packages/hass_frontend/
sudo rm -rf /usr/local/lib/python3.7/dist-packages/home_assistant_frontend-20190721.1.dist-info/
sudo pip install homeassistant==0.96.4
sudo reboot

it works now, hope to help you.

Sometimes this way no effect, and I tried the second successful way:

sudo pip install https://files.pythonhosted.org/packages/6c/0a/58939d4b6b465711022a5dd5514151d56c8069cf722ceb5bb3851a3ad9c1/home-assistant-frontend-20190721.1.tar.gz
sudo reboot
sudo rm -rf /usr/local/lib/python3.7/dist-packages/hass_frontend/
sudo rm -rf /usr/local/lib/python3.7/dist-packages/home_assistant_frontend-20190721.1.dist-info/
sudo pip install homeassistant==0.96.4
sudo reboot

I am going crazy, finally solved, and there is no definite solution that can be solved. I only keep trying, and I have luck.
Good luck everyone!

I'm wondering if it is the piwheels.org server choking under load and dropping connections. My connection dropped several times previously when installing dependencies and only by retrying many times did it succeed

Same issue today upgrading from 0.96 to 0.97. After manually uninstalling home-assistant-frontend and then reinstalling it, I was able to get the frontend working again. Not the smoothest upgrade I've done.

Apologies if this isn't the right place: I believe I ran into the same issue with a completely fresh hassbian (0.100) install on an RPI 3. I was able to resolve it by re-running the install step, which seems to support the idea of a truncated download caused by some sort of intermittent failure. (just a guess).

Resolution:

$ sudo bash
# systemctl stop [email protected]
# systemctl start install_homeassistant.service

Unfortunately, I didn't save home-assistant.log with the full details.

```
Unable to install package home-assistant-frontend==20191002.2: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
home-assistant-frontend==20191002.2 from https://www.piwheels.org/simple/home-assistant-frontend/home_assistant_frontend-20191002.2-py3-none-any.whl#sha256=c6236efa0ace6cf20a9f40c8fa80a47aa8bc91a80f0e44d121507f9e5960c20f (from -c /srv/homeassistant/lib/python3.7/site-packages/homeassistant/package_constraints.txt (line 14)):

I honestly think what's happening might be partially expected, either that server is interrupted or my little 8gb Sandisk is finally biting the dust. Likely doesn't happen with other packages because they are smaller?

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kirichkov picture kirichkov  路  3Comments

Elmardus picture Elmardus  路  3Comments

flsabourin picture flsabourin  路  3Comments

Konstigt picture Konstigt  路  3Comments

i-am-shodan picture i-am-shodan  路  3Comments