Packages and python dependencies

namebench requires python 2.4-2.7

Fedora 31 ships with python 3.7.6

How do I install and configure python 2.7 such that it could only be used with namebench, and it doesn’t disturb env of the existing python 3.7.6?

Thanks for reading.

Hmm,

A package that still needs Python 2.4? That package is probably old (not maintained any more). But here is an attempt on your question:

How about you download the Py2.4 archive, decompress it somewhere in your path, and point namesbench to the executable in the decompressed directory? Will that not work? Perhaps … if you really prefer an installed Py2.4, then install it into your local space (${HOME}/.local) and point namebench to that version in there. It is possible to run more than one version of Python that way. That should keep your system python(s) out of the picture while you enjoy namebench

I suspect that tweaking Namebench to work with Py2.7 may be even more daunting. I could be wrong

1 Like

I installed F31 as a new install and got both python 2.7 and 3.7 by default as you see here

dnf list 'python*'
Last metadata expiration check: 0:02:26 ago on Fri 24 Apr 2020 04:52:57 PM MDT.
Installed Packages
...
python2.x86_64                   2.7.17-1.fc31
...
python3.x86_64                   3.7.6-2.fc31
...


I am not sure why you would not have gotten the same since AFAIK F31 by default installs both python2.7 and 3.7. It is however, very easy to install python2 alongside python3 in fedora.

simply do “dnf install python2” and you should be good to go.

If python2 is already installed then look at /usr/bin/python to verify if it points to python3 or python2. I suspect that by default it points to python3 and thus might be causing the problem with namebench.

He did not say he needed python 2.4. His post said 2.4-2.7

Fedora 31 usually installs both python 2.7 and 3.7 so the easy way to fix his issue could be to install python2 directly from the fedora repos although I suspect it is already installed.

One thing he might need to check is that at least on my machine with both versions installed (and as I understand it, on all F31 installs) /usr/bin/python is linked to /usr/bin/python3.
Thus, any program that tries to use /usr/bin/python will by default use python3 and that might be where his problem with namebench has originated.