| How to install Tkinter |
UserPreferences |
| Tkinter Wiki | FrontPage | RecentChanges | TitleIndex | WordIndex | SiteNavigation | HelpContents | moin.sf.net |
There is an
overview of installing Tcl/Tk/Tkinter on the Python website. (Python.org doesn't seem to have this topic anymore.)
The
Python 2.3.3 Windows Installer includes Tcl/Tk as well as Tkinter. This is essentially a one-click install of everything needed.
On the Mac, the OS9 Python installer includes Tcl/Tk and Tkinter. However, Python releases after 2.3.x will not support OS9. On 18 March 2004, Tcl maintainers removed "most (if not all) of the MacOS-classic-specific stuff ... from the Tcl [8.5] CVS source tree." Previously, Jack Jansen removed the OS9 support from the Python 2.4 CVS.
OS X 10.2/10.3 comes with Python 2.3. Tkinter and
IDLE are easily loaded using the MacPython package manager. The package manager doesn't handle
Tcl/Tk/Aqua, which must be installed separately. Refer to the
Mac page on the Python website and the
MacPython website. [The differences between the latter two webpages need to be resolved. --KBK]
Linux and the *BSD platforms require a separate installation of Tcl/Tk. This is usually available as a binary package.
sudo apt-get install python python-tk idle python-pmw python-imaging(This installs Python, Tkinter [not really needed since it automatically gets installed with Python], IDLE, Python ?MegaWidgets, and PIL.)
yum install tkinter(This will install Python 2.3.4, Tk 8.4.7, and Tix 8.1.4, plus supporting packages, if necessary).
You can install the "idle" editor (which uses Tkinter) with
yum install python-tools
There does not seem to be a version of PIL included with Fedora Core 3.
yum install tkinter(This will install Python 2.3.3, Tk 8.4.5 and Tix 8.1.4, plus supporting packages, if necessary).
yum install tkinter(this will install Python 2.2.3, Tk 8.3 and Tix 8.1.4, plus supporting packages, if necessary). You may also want to
yum install python-imagingto get the ImageTk module from the
ActivePython provides an easily-installable form of Python for Linux, Windows, and Solaris (and other operating systems, for those willing to pay). Note that this is not FOSS; only authorized modifications can be redistributed.
sys.path.append('\\Program Files\\Python\\Lib\\python23.zip\\lib-tk')
#!python
#HelloWorld.py
import sys
sys.path.append('\\Program Files\\Python\\Lib\\python23.zip\\lib-tk')
import Tkinter
root = Tkinter.Tk()
l = Tkinter.Label(root, text="Hello, world!\nTkinter on PocketPC!\nSee http://pythonce.sf.net.")
b = Tkinter.Button(root, text='Quit', command=root.destroy)
l.pack()
b.pack()
root.mainloop()
Screenshot of Tkinter on Windows CE: