Problem Running tkinter gui Code

Zachary Ware zachary.ware+pylist at gmail.com
Sun Dec 27 16:26:25 EST 2015


On Sat, Dec 26, 2015 at 10:59 PM, brian.moreira
<brian.moreira at owl.ucc.edu> wrote:
> I trying to run a simple code that opens a Tkinter window with text in it, on my windows 8  machine using Python 3.4.3

Hi Brian,

Details are important, and there are several missing from your
question that make any advice just guesswork.  Please show us a simple
code example that doesn't work ("import tkinter;tkinter.Tk()" should
be enough to either run successfully or throw an exception in this
case), and how you're trying to run it that doesn't work.  With that
extra information, we should be able to figure out what's going on.
I've given a couple of guesses below anyway.

> I used to ge: “ImportError: no tkinter module exists”

That is not the phrasing that is actually used in Python; it is better
to copy and paste tracebacks than to retype them from memory.  I
realize that's not an option when the traceback is no longer
available, but that also means that the traceback is irrelevant to the
current issue.  My guess is that either your own code produced that
exception, or you were trying to import 'Tkinter' rather than
'tkinter' (the name changed from Python 2 to Python 3; many online
examples may still refer to 'Tkinter').

> But now it opens a windows Wizard screen that prompts me to Modify, Repair, or Uninstall Python.

That sounds like you're trying to run the installer rather than the
interpreter.  Without knowing how you're trying to run it, I can't
guess as to how that might be.

Regards,
-- 
Zach



More information about the Python-list mailing list