Score:0

Purpose of python-is-python3

in flag

Recent versions of Ubuntu have both python2 and python3 installed with the OS.

To make the command python execute python3, we can do either of these:

  1. sudo apt install python-is-python3
  2. sudo update-alternatives --config python (and choose the option for python3)

They both appear to do the same thing. Is there a subtle difference between them? If not, what is the point of having a whole package just to do what a simple command line does?

oldfred avatar
cn flag
Where are you getting any python2? ls -l /usr/bin/python* Ubuntu has not installed python2 by default for several versions. But a now very few apps are still based on python2 even though removed in focal. https://lists.ubuntu.com/archives/ubuntu-devel/2020-February/040918.html I do not let any python2 apps install as they obviously are not updated, Python 2 reached end-of-life on 1 January 2020.
k314159 avatar
in flag
@oldfred I think it's probably because I've been upgrading my Ubuntu versions for the last few years instead of installing the newer versions from scratch. Hence, the upgrade process has been keeping my defaults intact and python2 is still the default instead of python3.
Andrew Lowther avatar
jp flag
@k314159 how long have you been upgrading in place? I checked basic installs of 16.04, 18.04, 20.04, and 22.04 and none of them have `python` in the `alternatives` system. On the recent versions if I run the command `update-alternatives --config python` then I just get the result `update-alternatives: error: no alternatives for python`
k314159 avatar
in flag
@AndrewLowther thanks, I see what you mean - my other PC doesn't have python2 installed at all. Only my laptop has it, and I suspect it might be that an application that was installed on it may have needed python2.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.