How to install python module from HA CLI

I have a VirtualBox HA instance and I’m trying to use beatifulsoup module for python everything works fine but after a restart of HA the module is no longer available.

I tried to install it every time I run the command I need but that creates other issues for the command_line sensor I’m creating (it times out).

How can I update python properly to include the bs4 module so it’s still available
after restart?
I had no idea what category this question fits in so I posted it here.

pyscript dependency ?

Because now you install it in a container, which is not persistent.

I’ll take a look at pyscript; I see some requirements.txt references in the documentation so maybe it’s what I need; thanks

Took a while to understand some things but managed to make it work, so thanks.