Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install package home-assistant-frontend==20190626.0 #24968

Closed
paysenyu opened this issue Jul 5, 2019 · 34 comments
Closed

Unable to install package home-assistant-frontend==20190626.0 #24968

paysenyu opened this issue Jul 5, 2019 · 34 comments
Labels

Comments

@paysenyu
Copy link

paysenyu commented Jul 5, 2019

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

@paysenyu
Copy link
Author

paysenyu commented Jul 5, 2019

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

@Thunderbird2086
Copy link

I had same issue, and installed manually.

@paysenyu
Copy link
Author

paysenyu commented Jul 6, 2019

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

@elamperti
Copy link

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)

@paysenyu
Copy link
Author

paysenyu commented Jul 6, 2019

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=:

@elamperti
Copy link

@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.

@paysenyu
Copy link
Author

paysenyu commented Jul 6, 2019

@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.

@elamperti
Copy link

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

@paysenyu
Copy link
Author

paysenyu commented Jul 6, 2019

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

thank you so much

@paysenyu paysenyu closed this as completed Jul 6, 2019
@kwatkins
Copy link

kwatkins commented Jul 7, 2019

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

@hughhalf
Copy link

hughhalf commented Jul 8, 2019

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.

@elamperti
Copy link

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

@paysenyu
Copy link
Author

paysenyu commented Jul 8, 2019

Of course.

@paysenyu paysenyu reopened this Jul 8, 2019
@kpine
Copy link
Contributor

kpine commented Jul 8, 2019

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

@Uksa007
Copy link

Uksa007 commented Jul 9, 2019

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

@kirichkov
Copy link
Contributor

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

@kpine
Copy link
Contributor

kpine commented Jul 9, 2019

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.

@corvy
Copy link

corvy commented Jul 10, 2019

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

@balloob
Copy link
Member

balloob commented Jul 11, 2019

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.

@kirichkov
Copy link
Contributor

kirichkov commented Jul 11, 2019

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.

@elamperti
Copy link

elamperti commented Jul 11, 2019

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

Edit: This is not related.

@kirichkov
Copy link
Contributor

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 :-)

@elamperti
Copy link

elamperti commented Jul 11, 2019

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 🙂

@ratatine
Copy link

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.

@kpine
Copy link
Contributor

kpine commented Jul 11, 2019

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

@andy-vdg
Copy link

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.

@callifo
Copy link

callifo commented Jul 24, 2019

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.

@rangerzhou
Copy link

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?

@rangerzhou
Copy link

rangerzhou commented Jul 25, 2019

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!

@Barrysv
Copy link

Barrysv commented Jul 26, 2019

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

@ve6rah
Copy link

ve6rah commented Aug 8, 2019

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.

@rct
Copy link
Contributor

rct commented Oct 13, 2019

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 home-assistant@homeassistant.service
# 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)):

@spacesuitdiver
Copy link

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?

@stale
Copy link

stale bot commented Jan 28, 2020

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.

@stale stale bot added the stale label Jan 28, 2020
@stale stale bot closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests