Chris Green <c...@isbd.net> writes: > Andy Smith <a...@strugglers.net> wrote: >> Hi Chris, >> >> On Wed, Nov 06, 2024 at 10:54:17PM +0000, Chris Green wrote: >> > I have an OKI scanner which has a neat little linux app for running it >> > from a linux desktop. However it hasn't been updated from python 2.7 >> > days and I'm looking at ways I might get it to run on my recently >> > upgraded Debian 12 system. >> >> I'm pretty sure that someone somewhere is maintaining a Python 2 >> compatible interpreter so I'd probably install that from source >> somewhere and use that as the interpreter just for this one app. >> >> It is my understanding that no other project can call itself "Python" >> due to trademark laws so forks of Python 2 have to call themselves >> something else. One example would be Tauthon: >> >> https://github.com/naftaliharris/tauthon >> >> I have never tried it. >> >> It seems like a lot of work for what must be itself an abandoned app >> (otherwise it would have Python 3 support by now). >> > It's a fairly old printer but it is still supported (drivers etc. for > windows 11) but they've never updated the Linux scanner driver, I > don't suppose there's that much demand for it. It's a very neat > little app though so I'd like to keep using it.
The following suggestion is almost certainly overkill and probably more work to set up than simply porting the application to Python 3. On HPC systems, multiple versions of software packages are often installed parallel to the packages provided by the operating system. So the system I work with runs AlmaLinux 8.10, which provides Python 2.7.18 and Python 3.6.8. However, in addition to these version we also have a number of other versions of Python namely: Python/2.7.14-intel-2018a Python/2.7.15-foss-2018b Python/2.7.15-GCCcore-8.2.0 Python/2.7.15-intel-2018b Python/2.7.16-GCCcore-8.3.0 Python/2.7.18-GCCcore-9.3.0 Python/2.7.18-GCCcore-10.2.0 Python/3.6.4-foss-2018a Python/3.6.4-intel-2018a Python/3.6.6-foss-2018b Python/3.6.6-fosscuda-2018b Python/3.6.6-intel-2018b Python/3.7.2-GCCcore-8.2.0 Python/3.7.4-GCCcore-8.3.0 Python/3.8.2-GCCcore-9.3.0 Python/3.8.6-GCCcore-10.2.0 Python/3.9.5-GCCcore-10.3.0 Python/3.9.6-GCCcore-11.2.0 Python/3.10.4-GCCcore-11.3.0 Python/3.10.8-GCCcore-12.2.0 Python/3.11.3-GCCcore-12.3.0 Python/3.11.5-GCCcore-13.2.0 Python/3.12.3-GCCcore-13.3.0 (The suffix after the version refers to the toolchain, the main component of which is the compiler, used to build the software). These are installed using EasyBuild[1] (no Debian package), which allows one to install pieces of (mostly scientific) software plus all dependencies with a single command. The desired version can then be chosen by using Lmod[2] (Debian package: lmod). Like I say, probably overkill for the case here, but possibly useful for someone. Cheers, Loris Footnotes: [1] https://easybuild.io/ [2] https://lmod.readthedocs.io -- This signature is currently under constuction.