python ubuntu 2.7 - How to pip or easy_install tkinter

5 Answers

The Tkinter library is built in with every Python installation. And since you are on windows, I believe you installed python through the binaries on their website?

if so, Then most probably you are typing the command wrong. It should be:

import Tkinter as tk

Note the capital T at the beginning of Tkinter.

For Python 3,

import tkinter as tk

python3 mac download

My Idle is throwing errors that and says tkinter can't be imported.

Is there a simple way to install tkinter via pip or easy_install?

There seem to be a lot of package names flying around for this...

This and other assorted variations with tkinter-pypy aren't working.

pip install python-tk

I'm on Windows with Python 2.7 and can't apt-get.


When you install python for Windows, use the standard option or install everything it asks. I got the error because I deselected tcl.

In python Tkinter was default package ,repair at the time we can select the Tcl/Tk , in c directory the tkinter stored in C:\Python27\DLLs_tkinter.pyd on that place , reinstall otherwise directly put the (_tkinter.pyd)file into DLLsenter image description here

When installing make sure that under Tcl/Tk you select Will be installed on hard drive. If it is installing with a cross at the left then Tkinter will not be installed.

The same goes for Python 3:

if your using python 3.4.1 just write this line from tkinter import * this will put everything in the module into the default namespace of your program. in fact instead of referring to say a button like tkinter.Button you just type Button