Tkinter library

guys im having problem with tkinter library

import tkinter
top= tkinter.tk()

the error is tk attribute is not defined why am i getting this error

To rule out the obvious, you have got Tkinter installed in the path?

Yes, double check you have tkinter installed. If not that, then hit the docs again but make sure you have the right docs for your python. Do:

python --version

And then look at the URL in your browser. It should have 3 in the url for Python 3.x and 2 for Python 2.x

i doesnt show import error
it says the the attribute is not there

thank you guys for your help
sorry for this late reply
the problem was solved after I Reinstalled
python

1 Like
A free service run by Zed A. Shaw for learncodethehardway.org.