Python on HOAS

Team,
I’m very confused. I assumed python was already installed in HOAS

because I need to install uart-wifi as explained here: adamoutler/anycubic-homeassistant: Home assistant integration for Anycubic Printers. (github.com)

but I get an error on

pip install uart-wifi
as pip is not installed.

This is what I get when I logon as root:

| | | | /\ () | | | |
| |__| | ___ _ __ ___ ___ / \ ___ ___ _ | | __ _ _ __ | |
| __ |/ _ | ’
\ _ \ / _ \ / /\ \ / __/ __| / __| __/ \ | ’ | __|
| | | | (
) | | | | | | / / ____ \ __ \ __ \ || (| | | | | |
|| ||_/|| || |_|_| // __//|/__,|| ||_|

Welcome to the Home Assistant command line.

System information
IPv4 addresses for enp0s3:
IPv6 addresses for enp0s3:

OS Version: Home Assistant OS 11.2
Home Assistant Core: 2023.12.3

I tried to check python version but:

[core-ssh /]$ python3 --version
-bash: python3: command not found

I feel dummy but wah I’m doing wrong?

HAOS itself doesn’t have python, but the docker container named homeassistant which runs the “Home Assistant Core” indeed runs on python and is where you should do the pip install.
One of the most common ways to get inside that container is to go into the console of your HA machine and run: docker exec -it homeassistant /bin/bash. Be aware that when you upgrade the Core, you’ll likely have to pip reinstall again.

I continue to feel dummy :frowning: sigh!


| |  | |                          /\           (_)   | |            | |
| |__| | ___  _ __ ___   ___     /  \   ___ ___ _ ___| |_ __ _ _ __ | |_
|  __  |/ _ \| '_ \ _ \ / _ \   / /\ \ / __/ __| / __| __/ _\ | '_ \| __|
| |  | | (_) | | | | | |  __/  / ____ \\__ \__ \ \__ \ || (_| | | | | |_
|_|  |_|\___/|_| |_| |_|\___| /_/    \_\___/___/_|___/\__\__,_|_| |_|\__|

Welcome to the Home Assistant command line.

System information
  IPv4 addresses for enp0s3: xxx
  IPv6 addresses for enp0s3: xxx

  OS Version:               Home Assistant OS 11.2
  Home Assistant Core:      2023.12.4

  Home Assistant URL:       
  Observer URL:             
[core-ssh ~]$ docker exec -it homeassistant /bin/bash
-bash: docker: command not found

what am I doing wrong?

If you have a monitor and keyboard connected to the machine running HA, then you are connected to the “console”. Here you should have a command line prompt “#”. This is where you would enter the command I mentioned.

It’s a virtual machine so I do only have this connection.
I’ve tried and the IP of the virtual machine connects me directly to HA, I do not have any other interface

I apologize, I told you somewhat incorrectly… if you have a VM and have access to HA’s console using some kind of VM management system, you will get the HA CLI message along with the prompt “>”. Next type login and you should now see the # prompt.

If you don’t have a VM management system with access to the console, the SSH is your next alternative:

  • If you are using the “Update Advanced SSH & Web Terminal” AddOn with protection mode turned off, then you have access to the HAOS linux comand shell, and you can use the docker command I mentioned to get access to the HA Container. This would be my recommendation.
  • If you are using “Terminal & SSH” AddOn, this won’t work. (I think this is the one you are trying to use)
  • If you are using a command line shell to run ssh, this won’t work either unless you specify a special port using -p22222. But to use this, you have to setup SSH permission for the HAOS linux root which is not that easy to do.

Thank you!
I was using the standard SSH :frowning: and was locked!
I installed the advanced one and now is working.