Score:0

update-alternatives has no effect on the /etc symlinks?

ph flag

I want python3 and python to both point to the current python3.10 . i can not get that to work for the life of me. Here are the current commands

update-alternatives --install /usr/bin/python python $(which python3.10) 1
update-alternatives --install /usr/bin/python3 python3 $(which python3.10) 1

And here's the result

ls -lrta /etc/alternatives | grep python3
lrwxrwxrwx 1 root root   18 Mar 23 16:26 python -> /usr/bin/python3.8
lrwxrwxrwx 1 root root   18 Mar 23 16:40 python3 -> /usr/bin/python3.8

How is this supposed to work?

Note: this is in a single-use single-task Docker container with no gui involved, so I am unconcerned with side-effects of marginalizing the system python. We do not need it, just python3.10

guiverc avatar
cn flag
You've not said what OS/release you're using, but you'll discover many Ubuntu tools (esp. for desktop systems) will no longer function if the default python3 version is changed (*thus the protections you're likely coming up against*). What OS/release are you using?
ph flag
i am on `20.04` . it's a single-task container, i just need 3.10 working
guiverc avatar
cn flag
Please add additional details to your question, and also be complete; ie. 20.04 Server has lesser effects than 20.04 Desktop for example, but you've not said which 20.04 product.. Changing the default python3 may prevent future logins on a desktop system for example; loss of `gnome-terminal` etc... but won't impact text logins (ie. server) etc.
ph flag
@guiverc I did not add them because they're not necessarily relevant: I am only interested in mechanically how to make `update-alternatives` choose the `python3.10`. Any of the other system related fallouts/side-effects I already understand and am unconcerned. I'll add the details anyways .
muru avatar
us flag
1 is probably the lowest priority (or maybe 0). Either set a higher priority value, or switch from auto to manual mode.
ph flag
(slap forehead) i was thinking 1 were highest priority
David avatar
cn flag
Ubuntu 20.04 ships with python 3.8. Changing the default version will mess the OS most likely beyond repair. Ubuntu needs to run only the exact version it ships with. Ubuntu 22.04 ships with 3.10
ph flag
> Ubuntu 22.04 . That will have internal company support in about 2025
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.