1

My python script containing import matplotlib.pyplot as plt was not working and one of my classmate suggested to remove one of the python packages. (My dell ubuntu 12.04 desktop has two python programme 2.7 and 3) So, I run the command sudo apt-get remove python. Now my terminal and unity launcher is missing. How can I recover everything without reinstalling? I can login in the tty .

Thank you in advance.

(P.S. I understand removing python was a bad idea)

1 Answers1

2

You have to reinstall Terminal and Unity.

You also need to install Python again.

Login to tty and type this command:

sudo apt-get install --reinstall ubuntu-desktop gnome-terminal && sudo apt-get install python (or whatever is it's name)

na-no.
  • 846
  • I'm pretty sure Unity and Gnome-Terminal depend on Python, but I can't check at the moment. – wjandrea Aug 26 '17 at 21:00
  • result after the above comand "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem." Please suggest a way to fix this problem. – Heisenberg Aug 28 '17 at 13:13
  • Result after running 'sudo dpkg --configure -a' followed by 'sudo apt-get install --reinstall ubuntu-desktop gnome-terminal && sudo apt-get install python' "E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)" – Heisenberg Aug 28 '17 at 18:15
  • @Heisenberg Try "sudo apt-get -f" to fix your problem. – na-no. Aug 29 '17 at 08:18