:: Re: [DNG] Python2.7
Inizio della pagina
Delete this message
Reply to this message
Autore: Steve Litt
Data:  
To: dng
Oggetto: Re: [DNG] Python2.7
Rainer Weikusat via Dng said on Tue, 10 Jun 2025 09:26:35 +0100

>Steve Litt <slitt@???> writes:
>> Rainer Weikusat via Dng said on Mon, 09 Jun 2025 11:06:53 +0100
>>
>>>Marc Shapiro via Dng <dng@???> writes:
>>>> Is there anything in the OS supplied applications that requires
>>>> Python2.7?
>>>>
>>>> I have both Python2.7 and Python3.13 installed.  The link
>>>> /usr/bin/python points to /usr/bin/python3, which points to
>>>> user/bin/python3.13.  So the only time that Python2.7 would be used
>>>> is if it is specifically called for in a script.  I am not calling
>>>> 2.7, so, unless there are OS supplied files that require it, I
>>>> could delete 2.7, keeping only 3.13.
>>>>
>>>> Is there any reason to keep Python2.7?    

>>>
>>>Try deinstalling (dpkg --purge) it. This will tell what - if
>>>anything - depends on it. This should enable you to assess whether
>>>you need/ actually use this anything. If nothing comes up, just
>>>deinstall it. Should you in future want to use something which needs
>>>Python2, it'll just be reinstalled automatically.
>>
>> Unless he has self compiled or self created stuff needing Python 2.7.
>> I'd recommend backing up the Python 2.7 executable to another name,
>> replace the current python2.7 executable with a zenity popup stating
>> that the former Python 2.7 has been called.
>
>That's nothing but a waste of time and effort and source of possible
>future breakage as it changes a part of the filesystem supposed to be
>under control of the package manager behind its back. If nothing
>important depends on Python2, it can just be deinstalled, alongside all
>the unimportant things which may depend on it. Should it ever be needed
>for something, reinstalling it is going to be easy.


Oh, cmon Rainer. Time and effort? It's a rename, a tiny shellscript,
and a chattr command.

Changes a part of the filesystem? True. But it changes exactly one
file. Future breakage? The package manager will probably just ignore it
or issue a warning. If more severe, it will error out, you can back out
your chattr, and everything reverts, but I doubt it will come to that.

About "If nothing important depends on Python2": Unless you've never
installed anything any way except the package manager, you don't have
the necessary info to make that determination. Which is exactly why you
make the Zenity script and run with it for a couple months before
de-installing Python 2.7.

As far as "reinstalling is easy", no doubt about it. However, what will
be the symptom if it's needed and not there? Depending on what called
it and how it was installed, the symptom could be anything.
With the Zenity shellscript, you get an exact message of what went
wrong.

SteveT

Steve Litt

http://444domains.com