Accidentally changed the default python version to ubuntu. It was:

$ python --version $ 2.7 

It became:

 $ python --version $ 3.2 

How to change it back to 2.7. I have conflicts when updating or installing packages in apt. The manager tries to execute the script intended for the 2nd python through the standard alias "python", and since there is 3.2, exceptions are thrown.

    2 answers 2

    in console

     sudo ln -s /usr/bin/python2.7 /usr/bin/python 

      Ubuntu / debian has its own mechanism for working with different versions of the same programs. Most often it is found in the description of instructions for installing new versions of Java, but it also works for python. For python, it works through:

        sudo update-alternatives --config python 

      and does, in fact, the same thing - changes the link.

      A good article, true in English, about what other options are there: https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux