Score:0

Showing different version of python in different user

se flag

I have installed different versions of python in Ubuntu 20.04 LTS. I have added those versions in 'update alternatives' for switching to a different version.

When I switch to another python version from other than root user using 'update alternatives', it works properly for that user but it doesn't work for the root user. It shows the previous version in root user when I switch to python using update alternative as a root user.

Random Person avatar
us flag
Hey Tanvir Rahman! In Ask Ubuntu, we recommend having code output as text (and format it as code; read [this](https://askubuntu.com/editing-help) for more information) instead of screenshot in the question. You can [edit] your question and copy paste the code and output. Also, consider going through the [tour] page.
hr flag
I'm curious how you are running `update-alternatives` as a non-root user - it should require root because it's not setuid and it modifies symbolic links in `/etc`
Score:0
us flag

Each user on Ubuntu saves the default Python version independently from root or any other user. I have experienced this myself while having two users on one Ubuntu machine. Every new user created will have the system defaults (in everything, not just Python) when it is first created, regardless of what customized settings the root user may have.

Someone avatar
my flag
It's because the desktop environment configuration is stored in the `.config` directory in `$HOME` (`/home/user`). Generally, each time you create a new user, a new Home directory is created with an empty `~/.config` so all the desktop configurations (and many more configs) are lost. On the other hand Python does not store it's configuration in HOME directory (if not manually configured as such). So, Python configs are not lost.
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.