My friend just shared the existence of this software with me, and it looks perfect for me. His setup uses docker though, and mine doesn’t. The non-docker instructions seem simple enough, but I can’t figure out how to install the requirements. The “pip install” complains and says I should use apt, but I can’t find most of those requirements in my sources. For example “python3-verboselogs” isn’t found. Can someone help? I’d love to get this running!
That’s an Ubuntu thing. They prefer you use apt to install deps, but you don’t absolutely need to. The PROPER way to work around this is starting a localized python virtual environment for your project directory. That is essentially sandboxing a python environment that only installs dependencies into the project directory and doesn’t alter your system globally.
Lots of instructions on the steps to do this out there that should get you going in just a few minutes.
OK thanks. I will look into that. The fact that they are installed in a “sandbox”… will that prevent them from being accessible to the decluttarr script?
This happens inside whatever directory you have Decluttar in, and then the local venv runs decluttar
I don’t understand a bit of this, but I got everything installed and running. Seems I have to ‘activate’ the venv and run the script from within it. Not sure how this works with the script auto running itself periodically, but I guess I will find out! Thanks for pointing me in the right direction.
A virtual environment is just a copy of the python and pip binaries. When you activate the venv, the venv dirs temporarily get added to your path, so your regular python alias points to the binary in the venv (run
which python
with venv active to verify). Pip will install modules to a subdir of your venv. It basically works like npm and the node_modules dir.On second read, maybe you already knew that.
https://stackoverflow.com/questions/3287038/cron-and-virtualenv
I haven’t looked at the particulars of this applications, but if you path the python binary you use to run the application, it should use the environment that’s with it, without being activated. Activate just prepends the path for that venv to every command you give from then on when you’re working in a shell. And as noted in there, make sure you specify /bin/bash as your shell in cronjobs since it uses sh by default so you might run into issues in that context.