Michael Torrie <torr...@gmail.com> wrote: > On 12/22/20 8:10 AM, Chris Green wrote: > > I have (as discussed here) a printer utility that uses Python 2 and I > > can't update it to Python 3 because it has a .so library file which is > > compiled for Python 2. I think I have exhausted all the possibilities > > for converting it to Python 3 so now I'm looking at how to keep it > > working on my [x]ubuntu Linux systems as Python 2.7 becomes unsupported. > > > > How realistic/possible would it be to run the utility in a separate > > environment with its own copies of Python2 and any modules and > > libraries needed? I would install these 'by hand', i.e. not using > > 'apt' so they would stay as installed even as my system gets upgraded. > > > > There would obviously be *some* dependencies on the system libraries > > but I think they'd be pretty low level and thus their interfaces would > > be very unlikely to change for a long time so I should be able to run > > my old Python2.7 and the Python modules needed for the utility for > > quite a few years anyway (the printer it supports will wear out > > eventually!). > > Probably your best bet is to build a container image (perhaps a snap) > around with a distro that has Python 2.7 in it to house your app. That > way you've got everything you need including the required system > libraries. Right now you could build a image of it based on Ubuntu > 20.04 which has python 2.7 as an optional installable package. > I have it running on 20.04 (with a couple of compatibility packages from a PPA) but I know I start hitting problems as soon as I move to 20.10. So that does sound like an excellent idea. Where can I find information about building container type things like snap?
-- Chris Green ยท -- https://mail.python.org/mailman/listinfo/python-list