I do it manually, but I don’t have a lot of dependencies. Download the main package, install it, check the error message for the package it needs, download the new package, install the main package again… For python stuff pip download will also get the dependencies. Maybe you can use the Debian website since it lists the package dependencies and allows you to download from the website the deb files. You can probably automate with a bash script some stuff.
I do it manually, but I don’t have a lot of dependencies. Download the main package, install it, check the error message for the package it needs, download the new package, install the main package again… For python stuff pip download will also get the dependencies. Maybe you can use the Debian website since it lists the package dependencies and allows you to download from the website the deb files. You can probably automate with a bash script some stuff.