Tkinter for Windows7-64Bit Tkinter for Windows7-64Bit tkinter tkinter

Tkinter for Windows7-64Bit


If you are using python 3 then the code would use a lower case tkinter.

#python 2from Tkinter import *#python 3from tkinter import *

if that doesn't fix it then you can install it in several ways. check out this page: http://www.tkdocs.com/tutorial/install.html

If you can't get that to work another option is using pip. pip allows you to install modules easily. If you have the newest version if python 2 then it is installed and all you have to do is set a path. Click the start button and right click on computer. Select properties and then advanced settings. Under one of the tabs is a button called environment variables. Click on it and in the new windows scroll down until you see the word "path" on the right. Click on the text to the left of it and put in a ; to put in a new path. I don't know exactly how your file structure is but find python and set a path to the folder called scripts within python. An example would be something like this: "C:\python27\scripts".


There are two possible reasons that you are not able to get Tkinter working:

First ReasonFirst, this is dependent on if you have installed tk onto your computer. To find out if you have, and what version, run a Python shell via:

% C:\python32\python

From the Python command prompt, enter these two commands:

>>> import tkinter>>> tkinter._test()

This should pop up a small window; the first line at the top of the window should say "This is Tcl/Tk version 8.5"; Or whatever version has been installed on your computer. If you haven't installed, you'll want to get tkinter on there. I've found the following that may help with that:

http://www.tkdocs.com/tutorial/install.html

Second ReasonIf installing tkinter onto your machine isn't the issue, then this is most likely due to what version of python you are using, as this will change some small things.

Python 3:

from tkinter import *

Python 2.7:

from Tkinter import *

If you have python you are trying to run from 2.7 or before but are using it in Python 3, you may find the 2to3 tool helpful for adapting:

https://docs.python.org/2/glossary.html#term-to3


open IDLE Python GUI and type in import tkinter and after that type import_tkinter and if you wanna run a test just type in tkinter._test()works for python 3.4.3