Ubuntu – Removed Python 3 and now Ubuntu Software Center, terminal and other applications don’t work

13.04python3reinstall

I am a new Ubuntu user running Ubuntu 13.04.

I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.

Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.

Best Answer

    1. Open a text-only virtual console by pressing the keyboard shortcut Ctrl + Alt + F3.

    2. At the login: prompt type your username and press Enter.

    3. At the Password: prompt type your user password and press Enter.

    4. Reinstall the default Python 3 version by running the following command:

      sudo apt-get install python3-all
      
    5. Switch out of the virtual console and return to your desktop environment by pressing the keyboard shortcut Ctrl+Alt+F7. In Ubuntu 17.10 and later press the keyboard shortcut Ctrl+Alt+F2 to exit from the virtual console.


    After you have installed the default Python 3 version, you need to get back your default Ubuntu desktop system. In order to avoid messing something up, do it in the following order:

    1. First install the terminal from the console using the command: sudo apt-get install gnome-terminal. If you can't install gnome-terminal at all, skip this step and go to step 2.

    2. Return to your desktop and open the terminal using the keyboard shortcut Ctrl + Alt + T. From the terminal install the Ubuntu Software Center using the command:

      sudo apt-get install software-center
      

      In Ubuntu 16.04 and later run this command instead to reinstall the default Software application:

      sudo apt-get install gnome-software
      

      If you still can't open the terminal, run the same command from the console instead. If you can't install the default software application at all, skip this step and go to step 3.

    3. Open the terminal and try to open the Ubuntu Software Center from the terminal by running the appropriate command, either software-center or gnome-software. From the Ubuntu Software Center install the Ubuntu desktop system or else open the terminal (or the console) and install the Ubuntu desktop system by running the command: sudo apt-get install ubuntu-desktop.

  • Related Question