Hassio installation issue with Python

Hello !
Sorry for my English, but it’s very bad … thanks Google translat
I would like to install Hassio on my raspberry with Stretch installed, but I run into the same problem each time.
The installation of Python I installed Python 3.6.8, but when I want to install Home assistant after 1 or 2 minutes when I type “sudo pip3 install homeassitant” I have an error (homeassistant requires Python '> = 3.6. 1 'but the running Python is 3.5.3) where my problem comes from.

In French :slight_smile:
Je voudrais installer Hassio sur mon raspberry avec Stretch d’installé, mais je me heurte a chaque fois au même problème.
L’installation de Python j’ai bien installé Python 3.6.8, mais quand je veux installer Home assistant après 1 ou 2 minutes quand je tape “sudo pip3 install homeassitant” j’ai une erreur (homeassistant requires Python ‘>=3.6.1’ but the running Python is 3.5.3) d’où vient mon problème.

Thanks Merci

Raspberry pi 3 B+
Boot USB 16Go
Écran tactile

That isn’t Hass.io you’re installing, that’s Home Assistant.

If you want Hass.io and the add-ons then see https://www.home-assistant.io/hassio/installation/#alternative-install-on-a-generic-linux-host

If you want to use Python 3.6, ensure that you use the right commands. That’ll probably mean you have to create the venv (I’m assuming you’re following the right guide) you’ll do:

sudo -u homeassistant -H -s
cd /srv/homeassistant
python3.6 -m venv .
source bin/activate
pip3 install homeassistant

That middle line is the important one - it creates the venv with the right version of Python. Though, I’d highly recommend you jump to Python 3.7 since 3.6 will shortly be unsupported :wink:

1 Like

Thanks for your feedback. I test all this again thanks for your understanding


Good … It’s not easy, but it goes ahead … thank you

Sorry for this stupide question but that’s mean Python is not available in the Home Assistant installation ?
I have this :

host_os HassOS 4.13
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v7
python_version 3.8.3

So normaly I have python3 installed on my system
but in fact no python binary found :frowning:

/ $ which python3
/ $ which python
/ $ uname -a
Linux core-ssh 4.19.127-v7 #1 SMP Tue Sep 8 22:52:06 UTC 2020 armv7l Linux

I’ve done the installation of HASS with the image on my raspberry.
How to have python available ?
Thanks for your help.

Python exists inside the Home Assistant container not on the host.

What are you actually trying to achieve?

thanks for your quick answer

  - platform: command_line
    name: Passage SSOL
    command: "python3 /config/python_scripts/get_now.py"

but having an error like :
2020-09-16 15:10:46 ERROR (SyncWorker_6) [homeassistant.components.command_line] Command failed: python3 /config/python_scripts/get_now.py

my python script get_now.py is very simple :

datej="%02d/%02d/%04d %02d:%02d:%02d" % (dt.day,dt.month,dt.year,dt.hour,dt.minute,dt.second)

looks like python not found…

Well, command failed, doesn’t mean it doesn’t exist.

I’d suggest you open a fresh thread about your problem

You’ve right
With parameter :

command: "python3 /config/python_scripts/get_now.py"

and a simple print(“hello”)
it works…

So python3 is well implemented