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

Cant install HomeAssistant with DietPi-Software on RPi 2 Model B (armv7l) #4372

Closed
QuaiGoner opened this issue May 13, 2021 · 15 comments · Fixed by #4364 or #4809
Closed

Cant install HomeAssistant with DietPi-Software on RPi 2 Model B (armv7l) #4372

QuaiGoner opened this issue May 13, 2021 · 15 comments · Fixed by #4364 or #4809
Labels
Duplicate For issues that are/were already handled within another issue Known Issue 🐛 Solution available 🥂 Definite solution has been done
Milestone

Comments

@QuaiGoner
Copy link



Details:

  • Date | Thu May 13 12:59:01 BST 2021
  • DietPi version | v7.1.2 (MichaIng/master)
  • Image creator | DietPi Core Team
  • Pre-image | Raspberry Pi OS Lite
  • Hardware | RPi 2 Model B (armv7l) (ID=2)
  • Kernel version | Linux DietPi 5.10.17-v7+ DietPi-Config | Minor NTP enhancements #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux
  • Distro | buster (ID=5,RASPBIAN=1)
  • Command | sudo -u homeassistant dash -c
    . /home/homeassistant/pyenv-activate.sh
    pyenv install 3.8.8
    pyenv local 3.8.8
    pip3 install -U pip wheel
    [ -z '' ] || pip3 install
    exec pip3 install homeassistant
  • Exit code | 127
  • Software title | DietPi-Software

Steps to reproduce:

  1. ...
  2. ...

Expected behaviour:

  • ...

Actual behaviour:

  • ...

Extra details:

  • ...

Additional logs:

WARNING: `pyenv init -` no longer sets PATH.
Run `pyenv init` to see the necessary changes to make to your configuration.
Downloading Python-3.8.8.tgz...
-> https://www.python.org/ftp/python/3.8.8/Python-3.8.8.tgz
Installing Python-3.8.8...
Installed Python-3.8.8 to /home/homeassistant/.pyenv/versions/3.8.8

dash: 5: pip3: not found
dash: 7: exec: pip3: not found

@Joulinar Joulinar added Duplicate For issues that are/were already handled within another issue Known Issue 🐛 labels May 13, 2021
@Joulinar
Copy link
Collaborator

Hi,

I guess this will be fixed on next release with this PR #4364

@QuaiGoner
Copy link
Author

Hello. can i bypass the error manually?

@Joulinar
Copy link
Collaborator

@MichaIng
is there a way to overcome the situation until 7.2 has been released?

@MichaIng
Copy link
Owner

Since it requires multiple lines to be added, at least there is no trivial one-liner. But you could apply the change to /boot/dietpi/dietpi-software: https://github.com/MichaIng/DietPi/pull/4364/files#diff-98445566b948cc76bb45181ccd463ee93a7a441dbc8b25763d1b88f05f4ef8c5

  • Remove the red line and add the green lines.
  • The Python version increment is not required.

@BernieV1977
Copy link

Thx @MichaIng !

@Joulinar Joulinar added this to the v7.2 milestone May 16, 2021
@MichaIng
Copy link
Owner

I'll mark this as closed. Feel free to reopen if required.

@PrzemekSkw
Copy link

Hello, I try to install Home Assistant on Rpi2 but installation failed on Rust:

error: can't find Rust compiler
  
  If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
  
  To update pip, run:
  
      pip install --upgrade pip
  
  and then retry package installation.
  
  If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
  
  This package requires Rust >=1.41.0.
                                                                    
                                              │   ERROR: Failed building wheel for cryptography                                                                        
                                              │ Failed to build cryptography                                                                                           
                                              │ ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

Upgrade pip don't work, command not found.
Regards,
Przemek

@Joulinar
Copy link
Collaborator

Joulinar commented Oct 6, 2021

Could you share some more system details.

Required Information

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname -a
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

@PrzemekSkw
Copy link

Hi, @Joulinar I download last Rpi image Armv7-32bit and install it on Raspberry Pi 2 model B. I'm not home now so I cannot give You more details.
Regards.

@Joulinar
Copy link
Collaborator

Joulinar commented Oct 7, 2021

Ah yeah I remember that we had an issues once where cryptography requires rust to build now. Usually it was impacting ARMv8 only, as on 32bit we download pre-compiled packages from piwheels.org. #4104

Ok something we need to have a look how to bypass.

@PrzemekSkw
Copy link

OK, thanks. I will test Domoticz with my home automation for now :)
Regards.

@MichaIng
Copy link
Owner

MichaIng commented Oct 7, 2021

Actually there are pre-compiled wheels available for aarch64 at PyPI, but probably not for the Python version compiled when installing HA. I'll try to replicate.

@Joulinar
Copy link
Collaborator

Joulinar commented Oct 7, 2021

@MichaIng actually it's ARMv7 and I could replicate on my RPi3B+

@MichaIng
Copy link
Owner

MichaIng commented Oct 7, 2021

Python 3.7 and 3.9 wheels are shipped by piwheels: https://piwheels.org/project/cryptography/
We simply need to bump the Python version for HA to 3.9.

MichaIng added a commit that referenced this issue Oct 7, 2021
+ DietPi-Software | Home Assistant: The Python version compiled with Home Assistant has been bumped to v3.9.7, which resolves and issue with installs on 32-bit ARM systems. Many thanks to @Przemek for reporting this issue: #4372 (comment)
@MichaIng MichaIng linked a pull request Oct 7, 2021 that will close this issue
@MichaIng MichaIng added the Solution available 🥂 Definite solution has been done label Oct 7, 2021
@MichaIng
Copy link
Owner

MichaIng commented Oct 7, 2021

Solved:

Collecting cryptography==3.4.8
  Downloading https://www.piwheels.org/simple/cryptography/cryptography-3.4.8-cp39-cp39-linux_armv7l.whl (2.0 MB)

MichaIng added a commit that referenced this issue Oct 7, 2021
+ DietPi-Software | Home Assistant: The Python version compiled with Home Assistant has been bumped to v3.9.7, which resolves and issue with installs on 32-bit ARM systems. Many thanks to @Przemek for reporting this issue: #4372 (comment)
+ DietPi-Software | Home Assistant: Add newly required runtime library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate For issues that are/were already handled within another issue Known Issue 🐛 Solution available 🥂 Definite solution has been done
Projects
None yet
5 participants