-1

I just upgraded from Ubuntu 21.10 to Ubuntu 22.04. Everything perfect except for python. Python 3.11 or 3.10 broke my python scripts. In my struggle I think i damaged the system and now I have mess: I seem to have all 3.9, 3.10, 3.11 and cannot open a terminal etc... Can you please help? Many thanks for reading. Best regards, Zuheyr

  • 1
    If you "damaged the system", then reinstall Ubuntu to undo the damage. DON'T change the version of Python3 included with Ubuntu -- that will break your system. To run a different version of Python is fairly easy to do if you avoid the mistake of trying to install it through apt. – user535733 Apr 25 '22 at 15:38
  • tried apt related command - apt autoremove'? Also try doing a update one more time as insudo apt-get update && sudo apt-get upgrade && sudo apt autoremove' So system automatically update, upgrade & remove all packages as needed – Aravinth Apr 25 '22 at 15:59
  • Also, as you mentioned 'I think i damaged the system', Check your terminal command run & apt history -As it has all the history of previous runs, Its easy to find out where exactly you broke it (f you could find that, can easily revert) – Aravinth Apr 25 '22 at 16:03
  • 1
    Please reinstall. Messing with the default python is a fatal mistake. Almost the whole desktop is driven by python. – vanadium Apr 25 '22 at 16:46
  • 3

2 Answers2

0

Run

sudo apt install ubuntu-desktop

and you will get your system back.

I have the same issue, I cannot install Python 3.6. Ubuntu 2022 comes with Python 3.10.

ggorlen
  • 115
Aly
  • 1
0

If you have scripts that require an older version of Python and/or certain versions for specific modules and there are no packages to remedy this, your best bet—at least as a temporary workaround—is to ensure that said scripts work in a separate environment. One possible building block which I use myself is pyenv (Simple Python version management).