Straight up linux install?

I blew away an old image for my raz pi and I can’t remember now but I could have sworn it was a regular Raspberry Pi [Jessie] image and I did not use docker nor did I install in a virtual python environment. Am I crazy? I can’t find instructions any more for how to just install home assistant directly on a Raspberry Pi

You should probably use a venv, even if you didn’t before. I’ve been using a venv since I started over a year ago. Works fine for me.

1 Like

I don’t know why I have such a mental roadblock about that. I guess it seems like just another layer, a layer I don’t think I need.

Wait, so I have to use “Lite” OS? Does that mean I can no longer have HDMI output on the same pi?

No, google the differences. AFIK you can install anything the pi can use from Debian/Buster repo with lite version installed, you will need an internet connection.
For straight install you could follow instructions here: [https://github.com/home-assistant/home-assistant]
My advice if on a Pi, do the venv install as recommended above, due to the root user permissions issues, too much access to system for user Pi.
If starting over I also strongly recommend setting up the system on usb stick or ssd if your pi supports booting that way, helps avoid SD card issues in my experience. Just my 2 cents, YMMV.

1 Like

Here’s what I do.

# As root
apt-get update
apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
tar zxf Python-3.7.4.tgz
cd Python-3.7.4/
./configure --prefix=/usr
make -j 4
make altinstall
# Switch to Home Assistant User
sudo su - homeassistant
cd /home/homeassistant/
python3.7 -m venv homeassistant_venv
source /home/homeassistant/homeassistant_venv/bin/activate
pip install --upgrade pip
wget https://raw.githubusercontent.com/home-assistant/home-assistant/master/requirements_all.txt -O requirements_all.txt
# This takes hours to finish and you may need to install additional failed dependencies if you get errors
pip install -r requirements_all.txt
pip install mysqlclient
pip install homeassistant
# Go back to root
exit
# edit systemd service unit for new virtualenv
vim /etc/systemd/system/home-assistant.service 
[Unit]
Description=Home Assistant
After=network.target

[Service]
Type=simple
User=homeassistant
ExecStart=/home/homeassistant/homeassistant_venv/bin/hass -c "/home/homeassistant/.homeassistant"

[Install]
WantedBy=multi-user.target

edit or restore ~homeassistant/.homeassistant/configuration.yaml for your needs

2 Likes

If you want to run it on straight python, you need to be using a python virtual environment.

I recommend Docker instead though.

1 Like