How to run pip commands from command line?

I’m trying to install a custom component/module (pyalarmdotcomajax) and was told to “install this from the command line using pip”.

Can somebody please explain how to do this?

I’ve installed the “Terminal & SSH” add-on and configured my access. I am using PuTTy to SSH into the VM of Hassio - I can log into successfully.

When I try to run a pip command, I get this error:

-bash: pip: command not found

The add-on you installed brings you to the host OS, not into Home Assistant, that’s why the pip command fails.
From what I read it’s easiest to install the portainer add-on, unhide the hidden containers in portainer and then bash into the Home Assistant container from portainer.
However, no matter which way you choose to install this python library, once you update Home Assiatant, the container will be rebuilt (which deletes the library) amd you need to do the same thing again.

You may have to look for another way to install your custom component. If you use Home Assistant Core, then pip is the way to install various Python modules and their dependencies. But looks like you are using Home Assistant (formerly hassio). With hassio, using pip for a custom component would pertain to the hassio container named homeassistant, but this container’s python environment gets overwritten each time homeassistant gets upgraded. So you would have to do your pip again.

I googled around a little bit and may have found a solution for you:
This thread says you can install a custom called alarmdotcom using HACS

With this install method, you won’t need to run pip.

Thanks Vmaker and Burningstone! I ended up installing the alarm.com ajax script from HACS and am up-and-running. Definitely pulled some hair out trying to figure out the pip commands (and was never ultimately succcesful).

Thanks! Solved.