Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Tkinter working on mac [duplicate]

Tags:

python

tkinter

Possible Duplicate:
ImportError when importing Tkinter in Python

I have a Mac with Mountain Lion installed on it. I want to dev for Python on it, so I grabbed a Python 3.3 release candidate and started to work with it. However, I was trying to start working with Tkinter graphics, and when I tried this line:

from Tkinter import *

Eclipse (and IDLE) gave me this nasty error

Traceback (most recent call last):
File "/Users/venkatsmoorthy/Documents/workspace/Python/python/tkinterGUI/tkinter_1.py" line 7, in <module>
from Tkinter import *
ImportError: No module named 'Tkinter'

I don't wan't to downgrade. I am willing to though, but only to 3.2.3. Please don't make me do it.

I did google around, and figured out that OSX has some problem with Tkinter. I tried a few solutions, but no dice. Please answer with your own instructions for how to get tkinter working on python 3.3/3.2.

like image 676
pipsqueaker117 Avatar asked Aug 31 '12 19:08

pipsqueaker117


People also ask

Does Python tkinter work on Mac?

Tkinter is a graphical user interface (GUI) module for Python, you can make desktop apps with Python. You can make windows, buttons, show text and images amongst other things. Tk and Tkinter apps can run on most Unix platforms. This also works on Windows and Mac OS X.

Is tkinter and tkinter same?

The only difference between Tkinter and tkinter is that Tkinter was initially used with Python 2 and tkinter is used for working with Python 3 or later versions.

Do I need to pip install tkinter?

Tkinter actually comes along when we install Python. While installing Python, we need to check the td/tk and IDLE checkbox. This will install the tkinter and we need not install it separately. However, if we missed installing Tkinter while installing Python, we can do it later using the pip command.


1 Answers

Python 3 calls it tkinter not Tkinter.

like image 87
Katriel Avatar answered Nov 13 '22 09:11

Katriel