5
>>> from Tkinter import tkMessageBox

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from Tkinter import tkMessageBox
ImportError: cannot import name tkMessageBox

I am getting this error, even though from Tkinter import * is working fine. I am using Python 2.7.5.

1 Answer 1

13

tkMessageBox is a module on its own, so you should import it separately:

import Tkinter 
import tkMessageBox
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.