10

So I decided to upgrade my python version to 3.10.3 from 3.8.10 after my ubuntu installed 3.10.3 into the system. I used-

sudo update-alternatives --config python3

and then selected the appropriate number designated for 3.10. But after I closed the terminal after changing the version, the terminal refused to open up. Thankfully, I reverted the version back using the terminal on my VS code and it seemed to open up.

So I wanted to ask as to why does this happen, I mean we have to upgrade to the higher version for sure at some point of time. Is this the issue from the Ubuntu developers or is something wrong my Ubuntu ?

My specifications-

Shell - Bash

Terminal- Gnome terminal

Ubuntu version- 20.04 LTS

Parth Rajawat
  • 153
  • 2
  • 2
  • 7

1 Answers1

14

Never change the default version of python in Ubuntu!!

Thankfully, I reverted the version back using the terminal on my VS code and it seemed to open up.

You could have also logged into a virtual terminal at ctrl + alt + f3 to change the python version (use ctrl + alt + f7 to get back to GUI).

So I wanted to ask as to why does this happen

The default software in Ubuntu heavily rely on the default python version, and the default python version in Ubuntu is not meant to be changed.

Is this the issue from the Ubuntu developers or is something wrong my Ubuntu

No, this is expected.

To use another version of python, either call it with python3.10 (but don't symlink python3 with python3.10), or use virtual environments. You can also use Miniconda.

I mean we have to upgrade to the higher version for sure at some point of time

Not necessarily. Ubuntu supports the software in its repositories for quite some time (LTS releases are supported for 5 years). The point is, you don't need to upgrade to a later version of the operating system within this time frame.

If you always want to use the latest version of packages, you should use a rolling release distro instead.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212