0

I asked this question on how to get python to work in my Ubuntu Terminal. After trying python file.pyw. I was then given this error in the terminal: importerror: no module named _tkinter, please install the python-tk package. I searched for this in google and ran accross this on stackoverflow. However when i run that in the terminal I get

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied_
E: Unable to lock administration directory, are you root?  I am root.

Where do I go from here?

user9447
  • 1,945
  • 5
  • 27
  • 41

1 Answers1

2

You have to run this command as super user. Try the following:

sudo apt-get install python-tk

This should fix your problem. The magic extra thing to type is the sudo command. This will trigger a password prompt and after you've correctly entered your password the command following sudo (in this case apt-get install python-tk) will be run under administrative privileges.

bender
  • 1,854