M
M
Mister_Mad2021-10-23 16:07:36
linux
Mister_Mad, 2021-10-23 16:07:36

Changing the version of python to ubuntu broke everything, how to fix it?

Good afternoon, on the operating system there was a version of python 3.8.10, I installed 3.9.7 and switched to a newer one with the following commands

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2


After that, the terminal stopped starting, and many other jambs appeared in the OS.

How to upgrade to a newer version of python?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Karabanov, 2021-10-23
@Mister_Mad

Don't do that - you'll end up in dependencies hell
Use pyenv (don't forget to install libraries ).
To install pyenv curl https://pyenv.run | bash
Install Python pyenv install 3.9.7
Make it the default interpreter pyenv global 3.9.7, but you don't have to do that either, but you need to create virualenv and work in it.
And there is a win-win option - run in Docker.

S
Sergey Karbivnichy, 2021-10-23
@hottabxp

Open virtual Console( Ctrl+Alt+F1 or something like that) and put everything back. Or boot into safe mode and return everything back.

D
DollyPapper, 2021-10-23
@DollyPapper

The question is, where did you get the idea that those applications that broke are compatible with version 3.9? I don't know how things are in python with backward compatibility, but the libraries on which certain functions were tied in applications may not be backward compatible between 3.9 and 3.8, which is where everything broke. The "correct" transition may simply not exist.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question