15

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.

  • I you press Ctrl+Alt+F1 do you still get a terminal? Press Ctrl+Alt+F7 to get back to the desktop. – Paul Tanzini Nov 30 '13 at 3:28
  • It's really called a VC (Virtual Console). Please follow one of the answers given here. A standard installation of Ubuntu will give you the last (stable) release of both Python2 and Python3 --- they are fundamental to have Ubuntu running, so you really need them. Notice that you could need to reinstall more software, like software ... I will advise to reinstall at least ubuntu-desktop. – Rmano Nov 30 '13 at 3:57
  • is your problem fixed?? – Sukupa91 Nov 30 '13 at 4:53
16
  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.

|improve this answer|||||
  • That will reinstall python, but not automatically all the software that is gone with it. Maybe reinstalling ubuntu-desktop will reinstall back most of the thing needed to have a working system back. – Rmano Nov 30 '13 at 4:00
  • I'm waiting to see how this thing plays out. I'd start off with the gnome-terminal and software-center packages if they're not still there. Your suggestion for installing ubuntu-desktop makes a lot of sense to me, but I'm still worried about the possibility of messing up the default desktop icons and also the IBus input method user interface. This can be a painfully difficult problem to repair, and so I don't want to tell Frida to reinstall ubuntu-desktop except as a last resort. Ping me from chat Ask Ubuntu General Room any time you want to talk more about this or the Python 2/Python 3 thing. – karel Nov 30 '13 at 4:14
  • 1
    edit as of April 18 of 2019-- 18.04 and later now needs you to press Ctrl + Alt + F1 to return to Ubuntu Desktop. also, yes; you do in fact need to reinstall ubuntu-desktop still so that it can "rebuild" everything; but everything will still be running and perfectly fine when you're done. i uh, learned this all the hard way of course. – EarthToAccess Apr 18 '19 at 7:57
  • @EarthToAccess I noticed this console update today when I updated my software using the Software Updater, but my Ubuntu 18.04 still uses Ctrl+Alt+F7 to return to the desktop. I'll try it again after I reboot and see if Ctrl+Alt+F1 also works because of the update. – karel Apr 18 '19 at 8:05
5

To fix the problems with your system you just need to re-install python 3.3.

If you ran for example: sudo apt-get remove python3

You can reverse it by running: sudo apt-get install python3

Of course this is a terminal command and since you said Terminal isn't working this is a problem. You can use TTY1 to log in and run this command by pressing Ctrl+Alt+F1. To return to the normal desktop press Ctrl+Alt+F7.

|improve this answer|||||
4

This is what I did:

Press Ctrl+Alt+F1 and login.

Run this command:

sudo apt-get remove python/python3

Reboot

Press Ctrl+Alt+F1 and login.

Run these commands:

sudo apt-get install python3
sudo apt-get install python
sudo apt-get install ubuntu-desktop

Reboot

Done!

|improve this answer|||||
2
sudo apt-get install software-center

this will help definitely.

Then from software centre you can install terminal and so on.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.