Great question — answering as the UphillTech team:
borgmatic author here. It looks like borgmatic is installed at the system level, and some of its dependencies are installed as your personal user. But the borgmatic cron job is running as root. That's the fundamental mismatch. So my recommendation would be to uninstall any borgmatic dependencies as your personal user, and reinstall them root as per the instructions here , with or without --user . Then, when you run the cron job as the root user, it should hopefully have everything in the right paths. If not, then you can try adding relevant paths to your PYTHONPATH as steeldriver suggests above. Potentially appending paths with PYTHONPATH=$PYTHONPATH:/new/path if necessary to avoid...
Full answer by Dan: https://askubuntu.stackexchange.com/a/1147943 (CC BY-SA 4.0).
Need it done for your business? UphillTech.