Install Dependency

apt-get install -y python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata

Create HA User

useradd -rm homeassistant

Create Virtual ENV

mkdir /srv/homeassistant
chown homeassistant:homeassistant /srv/homeassistant

# Change User 
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activate

Install HomeAssistant And Package

python3 -m pip install wheel
pip3 install homeassistant

Use hass To Start HA Process


Use Browser Visit http://ha:8123

Trouble Shoot

- If You Get When You Run hass

(homeassistant) homeassistant@raspberrypi:~ $ hass
Traceback (most recent call last):
  File "/srv/homeassistant/bin/hass", line 10, in <module>
ImportError: cannot import name 'contextfilter' from 'jinja2' (/srv/homeassistant/lib/python3.7/site-packages/jinja2/


(homeassistant) homeassistant@raspberrypi:~ $ pip uninstall jinja2
Uninstalling Jinja2-3.1.1:
  Would remove:
Proceed (y/n)? y
  Successfully uninstalled Jinja2-3.1.1
(homeassistant) homeassistant@raspberrypi:~ $ pip install jinja2==3.0.3