Specifying Debian dependency between two versions & apt-get installing .deb files

These informations are probably of most interest to package maintainers:

Dependency on specific package versions

Here is how to specify a python3 dependency between version 3.5 (equals to or later), and 3.6 (must be earlier) in debian/control:

Depends: python3 (>= 3.5), python3 (<< 3.6)

So you basically specify two dependencies.

Note, this will not work for Debian Buster (Raspbian buster anyways), as it ships Python 3.7.

Another possibility, specifically for Python, is to specify version as part of the package name:

Depends: python3.5

This is the way I ended up doing it.

Installing a .deb local package with apt-get

Usually, a local package can be installed using

dpkg –i <filename>.deb

This however does not install the dependencies!

You can install the package using apt-get like this:

apt-get install ./<filename>.deb

Assuming that the package is located in the local directory.

Thanks to this Superuser answer for this tip!