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
Asked
Active
Viewed 9,865 times
-1
-
1If 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 in `sudo 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
-
1Please 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
-
3Does this answer your question? [Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work](https://askubuntu.com/questions/384033/removed-python-3-and-now-ubuntu-software-center-terminal-and-other-applications) – karel Jun 20 '22 at 03:03
2 Answers
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).
Markus Ueberall
- 541
- 2
- 9