Python: command not found


I have installed a hassio docker qemux86-64 on a Ubuntu machine.

When I run in the terminal ‘python /config/’ it returns ‘python: command not found’.

I did search all folders manually and run ‘which python’ and ‘find * | grep python’ and none. It looks like I do not have python installed.

The question: how could I install or add python to my /usr/bin or something like this?

If you’re trying to run a Python script from either of the SSH addons, you can’t do that. If you want to run python scripts via HA, you can either using the python_script: integration here, use AppDaemon, or create a custom component.

Thank you, @rccoleman for your reply.
When I try to use the python_script I receive this notification:

Invalid config
The following integrations and platforms could not be set up:

  • python_script
    Please check your config.

What I am trying is pretty simple. See below.
I have a shopping list saved in the ‘.shopping_list.json’ file and I need to parse that and send me by a telegram notify.


  - platform: command_line
    name: shopping_list
    command: 'python3 /config/'

telegram notification:

      - service: notify.telegram_to_me
          message: >
            Your Shopping List. {{ states('') }}
            {% for item in %}
              - {{ }}
            {%- endfor -%}

# coding: utf8
import json

with open('/config/.shopping_list.json') as data_file:
    shoppingListData = json.load(data_file)

content = u"Lista de Compras:\n"
for entry in shoppingListData:
    if not entry['complete']:
        content += u"- %s\n" % entry['name']

content += u"\n"


The problem: the notification never arrive.

If I remove the for loop from the message and change by a simple text the notification normally arrives to me.

I cannot understanding where is the wrong.

Edited this to:

      - service: notify.telegram_to_me
          message: >
            Your Shopping List:

And I have another error on my code: the sensor: duplicated. The error while parsing the .json file occurred by that.