Cannot start home assistant after install (Solved)

Hi all. Apologies, but I’m just not able to find anyone else with this issue. I installed according to the “virtualenv” tutorial but after installation I cannot get home assistant to run. hass --open-ui fails with the following messages:

homeassistant@raspberrypi:/srv/homeassistant/bin$ ./hass --open-ui
Traceback (most recent call last):
File “./hass”, line 11, in
sys.exit(main())
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/main.py”, line 364, in main
args = get_arguments()
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/main.py”, line 121, in get_arguments
import homeassistant.config as config_util
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/config.py”, line 21, in
import homeassistant.helpers.config_validation as cv
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/config_validation.py”, line 23, in
from homeassistant.helpers import template as template_helper
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/template.py”, line 7, in
import jinja2
File “/srv/homeassistant/lib/python3.4/site-packages/jinja2/init.py”, line 33, in
from jinja2.environment import Environment, Template
File “/srv/homeassistant/lib/python3.4/site-packages/jinja2/environment.py”, line 15, in
from jinja2 import nodes
File “/srv/homeassistant/lib/python3.4/site-packages/jinja2/nodes.py”, line 19, in
from jinja2.utils import Markup
File “/srv/homeassistant/lib/python3.4/site-packages/jinja2/utils.py”, line 624, in
from markupsafe import Markup, escape, soft_unicode
ImportError: No module named ‘markupsafe’

What I’m getting form this is that i am missing a module… but when I try and (re)install I get this message:
Requirement already up-to-date: MarkupSafe in /usr/lib/python3/dist-packages

Clearly the problem is elsewhere? (Probably behind the keyboard, lol!)

Has anyone any suggestions as to what I’m doing wrong? I’m using raspian on a raspberry pi and am also running pihole - does anyone know if they conflict?

Thanks for any help you can give!

Tommakesmusic

Your output now shows you’re trying to run hass without the actual virtualenv activated

Hi there. Thanks for the reply. This error occurred when I ran the virtual environment - I just had the screen text copied without the initial (homeassistant) and I just used what I had in the clipboard. My bad!

Realising there was something missing, I also tried to run an upgrade (inside the virtual environment) - the results weren’t good.

When running “pip3 install --upgrade homeassistant” I got the following error:

Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_install.py”, line 387, in setup_py
import setuptools # noqa
File “/srv/homeassistant/lib/python3.4/site-packages/setuptools/init.py”, line 10, in
from six.moves import filter, map
ImportError: No module named ‘six’

“setuptools” clearly wasn’t installed.

To fix this I ran “pip3 install --upgrade setuptools” (from inside the virtual environment) and once it had finished, “pip3 install --upgrade home assistant” seemed to work - it installed four packages that clearly hadn’t installed before.

“(homeassistant)homeassistant@raspberrypi:/home/pi$ /srv/homeassistant/bin/hass --open-ui” has now started the UI and I’m now up and running!

Thanks!