Python – How to Install/Import Tkinter on Ubuntu 14.04

14.04pippython3

I got a pretty confusing Problem:

I build a python program using tkinter. Then I dist-upgraded my ubuntu 13.10 (amd64) to ubuntu 14.04 LTS, now I tried to run my tkinter program. My compiler told me

ImportError: No module named tkinter

(The same with Tkinter or tk/Tk)
Then I tried to reinstall tkinter using pip:

$ pip install tkinter


Could not find any downloads that satisfy the requirement tkinter
   Cleaning up...
   No distributions at all found for tkinter

again the same with Tkinter, tkinter, tk and Tk

So what happened?
Have I got to run something like

$ pip update

(because tk is not anymore in the pip-repository)
But why is it not installed anymore on my pc?

Edit:
1. I do not have no root access
2. in the pip.log is

>

  Downloading/unpacking tk   Getting page
> https://pypi.python.org/simple/tk/   Could not fetch URL
> https://pypi.python.org/simple/tk/: 404 Client Error: Not Found   Will
> skip URL https://pypi.python.org/simple/tk/ when looking for download
> links for tk   Getting page https://pypi.python.org/simple/   URLs to
> search for versions for tk:   * https://pypi.python.org/simple/tk/  
> Getting page https://pypi.python.org/simple/tk/   Could not fetch URL
> https://pypi.python.org/simple/tk/: 404 Client Error: Not Found   Will
> skip URL https://pypi.python.org/simple/tk/ when looking for download
> links for tk   Could not find any downloads that satisfy the
> requirement tk

something pretty close happened when I tried To install something using apt on my RaspberryPi without running

$ apt-get update

for a few months

I'd be glad for some help.

Best Answer

Try this:

sudo apt-get install python-tk

or, since your question is tagged as python3, this:

sudo apt-get install python3-tk
Related Question