I built a debian package of my Python 3 Application using dh-virtualenv. On Raspbian Buster everything works fine but with the recent release of Bullseye I want the package to be compatible.
Sadly when I install the .deb under Bullseye, all my custom Python packages are missing. Running the Application throws a ModuleNotFoundError. I realised that the sys.path list did not contain the path to the site-packages of the virtualenv (which under Buster it does), so I appended it manually. This fixed the ModuleNotFoundError for most of the Python packages. However my application depends on some CPython packages as well and all those are still missing.
Running path/to/virtualenv/bin/pip3 list
showed that they are not installed although I find all the correct .so and .dist-info files under the site-packages.
Under Buster the same command listed all the extensions as expected.
My guess is that the problem is caused by different Python versions being used. Buster uses 3.7 and Bullseye uses 3.9. Do you have any ideas what could cause this problem and how I could fix it?
Thanks a lot Nathan