Ubuntu 20.04 仍然支持 Python2

Ash*_*ash 1 python-2.7 20.04

我从 Ubuntu 19.10 升级到 20.04。很多文章提到最新的LTS将不支持python2。但我仍然拥有它。这是为什么?

$ python
Python 2.7.18rc1 (default, Apr  7 2020, 12:05:55) 
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "hello world!"
hello world!
>>>
Run Code Online (Sandbox Code Playgroud)

dob*_*bey 5

“支持”在这里是一个有点强烈的词。正如您所说,您执行的是升级,而不是全新安装。默认情况下未安装 Python 2,并且很久没有安装,因为它在 18.04 之后从主存档移到了 Universe。但是,Universe 中仍然有很多依赖于 python2 的包,因此它仍然在 Universe 存档中。

由于您已经安装了该软件包,因此它会被升级而不是被删除。