Stuck in installation of core on a raspbery pi4

Hi,

I´m new to homeassistant and trying to install this on a Raspberry PI with the core method.

I worked through the steps and get stuck when I have to install HA :slight_smile:

(homeassistant) homeassistant@ha:/srv/homeassistant $ pip install homeassistant==2023.11.2
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Maybe anybody has a hint, thx in advance

JL

My first suggestion would be to use Docker (HA Container).

However, if you want to continue with this, make sure the venv is active and configured according to the docs.

Hi there!

I have the exact same problem with my Pi4.
I would prefer not to use Docker. Does anybody know a workaround as the doc is broken?

I tried to force the installation by adding --break-system-packages. It does things… it installs Home Assistant. The installer says to update the PATH environment variable, and I did. But when launching hass it doesn’t work and I received this error message:

homeassistant@raspberrypi:/home/arnaud $ hass
Unable to find configuration. Creating default one in /home/homeassistant/.homeassistant
2023-12-22 19:35:14.232 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

The error in the OP is from not having the venv active. I just did a test install on a Bookworm host, and with the venv activated you don’t get that error. However without the venv activated you do get that error.

Hi @Tinkerer,

Thanks for your assistance. I found the issue!

It was because the copy and paste from the documentation website seems to not work properly. In fact I wasn’t in the /srv/homeassistant directory when trying to create the venv.