Python 2.7 went out of support at the beginning of 2020, is it now possible to remove it from buster installations?
- posted
3 years ago
-- Chris Green
Python 2.7 went out of support at the beginning of 2020, is it now possible to remove it from buster installations?
-- Chris Green
On Tue, 29 Dec 2020 21:59:18 +0000, Chris Green declaimed the following:
Not really...
No you can't. From #975014:
Debian Bullseye includes a version of Python 2.7 (and a short list of related packages like setuptools still built Python 2 packages). However, these are only included for building a few applications which still require Python 2 as part of their build process. Python 2 is not supported for running applications and there won't be any security updates for Python
2 in Bullseye. """-- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
Check whether you haven't got any Raspbian packages that use Python 2.7 and no other Python programs from 2rd parties or written by yourself.
If you don't have any of these dependencies it can be removed.
To search for them:
- if you write Python, grep your local source files for strings unique to Python 2.7 such as library functions used by 2.7 and not by 3.7
- running "apt-get --no-remove autoremove" should report any packages that were installed to satisfy dependencies without removing them. **** caution I've not tried this, but its documented in the apt-get **** manpage.
-- -- Martin | martin at Gregorie | gregorie dot org
Yes, this is what I assumed would be true but I just wanted to check that there aren't any system dependencies on Python 2.7.
I moved and/or converted all my Python code to Python three a while ago.
Well one can simply do "apt remove python2.7" and see if it removes anything significant with it (apart from the associated libraries of course, which should go). You only have to say "N" when it asks if you want to continue so it doesn't then do the removal.
-- Chris Green
when I installed software from Adafruit for an audio hat (actually their Voice Bonnet) it issued a warning that is was going to change the default system python to Python3, so fare I have experienced no issues this may be a safer way to conver to python3 as python2 is still available if needed.
-- The system will be down for 10 days for preventive maintenance.
Why bother? Let the distro packagers do it when they consider it safe.
But they won't. If you have python2.7 installed it will simply stay there for ever unless you remove it yourself explicitly.
It's like if you have any 'top level' program installed, it will stay there until you remove it. Python 3.x isn't a new version of Python
2.7, it's a different/new program.Python 2.7 would probably disappear if you upgrade to the next version of Raspbian/Debian.
-- Chris Green
Thats the current position for Fedora: now that Fedora 33 is out. This laptop is running F32, which I'll be upgrading to F33 later in January. It still has Python 2 software installed but there are no longer any Python 2 packages in its package library.
But, although all distros will stop support for Python 2 at a similar time, the exact timing for each distro will depend on the speed at which packages that contain Python are upgraded from 2 to 3 by its package maintainers. I'm not surprised if Fedora is doing it before Raspbian since its a bit more on the bleeding edge than Raspbian or Debian are.
-- -- Martin | martin at Gregorie | gregorie dot org
It won't, a quick check shows Debian Bullseye contains 2.7, but that is what I meant, eventually 2.7 will disappear in a new release.
Doubtful. I actually just cleaned over 100 packages from my Debian 10 desktop that were from Debian 9. They may have come from quite a few versions ago since they weren't exactly familiar. Many were libraries with no dependencies. Part of the upgrade process actually is this kind of cleanup but I at least have been slacking. According to aptitude search '~o' I still have a bunch of packages marked obsolete but at least about a quarter of them are the transitional dummy kind so actual content taking space is negligible.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.