Click the >_ icon and you will be presented with a page where you can connect to the container’s console where you can enter pip install python-aqi to import the library. Remember, containers are disposable, so when you upgrade, this container will be discarded along with the python-aqi library. After upgrading, you will have to re-install the library.
Yes, I managed to get Containers displayed only after I unhid Hassio Supervisor.
‘Homeassistant’ container was inhid, however it’s still not displayed in Containers list.
Is this a bug of Portainer?
I installed ‘python-aqi’ library as you suggested in ‘Hassio Supervisor’ Container, though in fact, nothing changed. Scripts report that ‘aqi’ is still not found.
If you re-read my posts, you will see that I never suggested to install it in that container. I said to install it in the homeassistant container.
I’m happy to hear you were able to install it in the correct container and it works. I have confidence that the next step, involving the command_line sensor, will also work correctly.
When you have a moment, please mark my post with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic now has an accepted solution. It will also automatically place a link below your first post that leads to the solution. All of this helps other users find answers to similar questions.
Update:
Installation of Python Library in HA via Portainer works only before next reboot.
After reboot you need to reinstall again… Some kind of inconvenience.
I’m not seeing that behavior. I have it installed in my test system which is turned on only when I need it. The docker containers are regularly started and stopped. None of that affects the ability to use the python-aqi library.
The library is installed in the homeassistant container. If that container is replaced (such as after an upgrade or on demand to re-create the container from its image) then the library will be eliminated. Otherwise, a simple stop/restart of the container (such as caused by a reboot) won’t lose the library.
Why did you use double braces {{ in some places and a single brace { in others?
You should be using double braces only. They serve to indicate that the enclosed expression is a Jinja2 template. Single braces are for an entirely different purpose that’s not applicable in this case.
In addition, the arguments should be separated by a space character and not a comma.