Preferred method for install script for yunohost package? (pip or apt-get)

For the first yunohost package I made for archivebox, I used pip to install the package.

Archivebox has a few other ways it can be installed: they also have a debian package which can be installed.

I’m thinking of changing my install script to install by adding the debian repo, and then installing the package from there using apt-get (this would allow me to more easily get all the dependencies archivebox relies on, including a couple optional features which I’m currently missing).


echo "deb focal main" | sudo tee /etc/apt/sources.list.d/archivebox.list
sudo apt-key adv --keyserver --recv-keys C258F79DCC02E369
sudo apt update

Is there a “preferred” way to write install scripts for yunohost? Or any reason not to switch to using this instead of the pip install?


We try to avoid to add debian repo for specific apps. If we do, we install the package and remove the debian repo until the next run of the upgrade script.
You can do that with ynh_install_extra_app_dependencies helpers

So i think in your case, the pip install is the good way if you do it in a virtualenv. If you don’t do it in a virtualenv it could make some change that can’t be removed simply in the system.