Does anyone happen to know how I can install tkMessageBox on Python2.7? I'm trying to run some Tkinter scripts that I've found, and I need the tkMessageBox to do so. I tried "pip install tkMessageBox" and got a message that said no package by that name could be found. I also tried looking on Christoph Gohlke's site for an installer, but no luck. I've read that tkMessageBox has changed names in Python3.x--can I pip install it by using a different name? Any help others can offer would be most appreciated. (In case it matters, I'm working in Windows 8.)
Asked
Active
Viewed 1.3k times
1 Answers
10
It comes with Tkinter, it's not a separate package. If you have tkinter, you have tkmessagebox. However, it has been renamed in python 3
python 2.x:
import Tkinter
import tkMessageBox
python 3.x:
from tkinter import messagebox as tkMessageBox

Bryan Oakley
- 370,779
- 53
- 539
- 685
-
Thank you, @Bryan. I was very impressed with the code you put together here: http://stackoverflow.com/questions/3876229/how-to-run-a-code-whenever-a-tkinter-widget-value-changes. I was getting an error message because I was using the import method for Python 3.x. All is well now (save for the downvote!) – duhaime Sep 29 '13 at 12:49