Iβm trying to install esphome on the same Pi as I have home assistant running.
HA is installed with Hassbian.
I move inside the virtual env and try to install esphome with pip install esphome and the process starts but I get an error and it is not installed.
(homeassistant) pi@hassbian:~ $ pip install esphome
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting esphome
Downloading https://files.pythonhosted.org/packages/b7/b2/4849b6abd4dae93cb0d1b3f2ca8dc569869d6d42cbc23ddbb56e19c39cb9/esphome-1.12.1-py2.py3-none-any.whl (539kB)
100% |ββββββββββββββββββββββββββββββββ| 542kB 584kB/s
Collecting pyserial<4,>=3.4 (from esphome)
Downloading https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl (193kB)
100% |ββββββββββββββββββββββββββββββββ| 194kB 623kB/s
Collecting protobuf<3.8,>=3.7 (from esphome)
Downloading https://files.pythonhosted.org/packages/41/7c/6029e1b37ca730648a22502d75e2c7707da7a207db1b366f76edc5a01a0b/protobuf-3.7.0-py2.py3-none-any.whl (404kB)
100% |ββββββββββββββββββββββββββββββββ| 409kB 256kB/s
Collecting PyYAML<6,>=5.1 (from esphome)
Downloading https://files.pythonhosted.org/packages/9f/2c/9417b5c774792634834e730932745bc09a7d36754ca00acf1ccd1ac2594d/PyYAML-5.1.tar.gz (274kB)
100% |ββββββββββββββββββββββββββββββββ| 276kB 384kB/s
qRequirement already satisfied: paho-mqtt<2,>=1.4 in /srv/homeassistant/lib/python3.5/site-packages (from esphome) (1.4.0)
Collecting platformio>=3.6.5 (from esphome)
Downloading https://files.pythonhosted.org/packages/f1/92/202b47ed8b4e8dcef98a74426dbffa139d10d11f01a10fe6fc98728fbade/platformio-3.6.5.tar.gz (112kB)
100% |ββββββββββββββββββββββββββββββββ| 112kB 622kB/s
Complete output from command python setup.py egg_info:
PlatformIO Core v3.6.5 does not run under Python version 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516].
Minimum supported version is 2.7, please upgrade Python.
Python 3 is not yet supported.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-21l38dsv/platformio/
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
If I try to install it outside of the virt env I get an error telling me pip isnβt installed.
Can anyone please help me, what is the best way to install it on the same Pi as HA?
according to python --version the python version in the virtual environewmt is 3.5.x
I think esphome supports up to 2.7.
correct?
So id have to downgrade python?
If im wrong (I usually am ) is it safe to upgrade the python version inside the virt enc that HA is installed?
Iβve installed pip outside the virt env, and seeing if esphome will install, I think this is probably not the best route though?
I installed pip outside the virtual env with sudo apt install python-pip
then installed esphome with pip install esphome
when I try to use it I get the -bash: esphome: command not found error
I think this is what is confusing me a little, all the documentation on the official site says to use pip, yet a little googling refers to pip2
As far as I can see it needs to run with python 2.7, and so older versions wont run it.
Ive tried to run a compile with python2 -m blahblah.yaml compile but get the segmentation error as seen in a post above, a reboot of the pi didnβt help
thanks for the link, interesting.
I think for the βsafetyβ of my home assistant instance, I will not try to mess to much on this Pi, so ill try and get another Pi I have laying about set up as a dev machine.
In your link you mention installing Python 2, but this comes pre-loaded on Raspbian stretch (lite) right?
I can see youβre a fan of docker, but my setup does not include docker, and tbh im not prepared to overhaul my entire eco-system. Appreciate the input though