I am struggling with cutting off python 2 functionalities from ubuntu 20. I have a project that porting to python 3 may take a lot of time so i have to use ubuntu 18 packages to satisfy its module imports/dependencies. Unfortunately installing those packages with
apt install ./old-deb-package.deb isn’t an option because it wants to downgrade or remove some already installed packages.
Is there a way to install or attach somehow those packages locally to one project only so they would be a part of it, not part of the whole system?
I tried to do it brute force just unpacking .debs to a single directory inside the project and adding entries to import path variable alongside with
LD_LIBRARY_PATH but it still is missing some internal modules like for example for
glib it cannot import