|FAQ Index - Search - Recent Changes - Everything - Add entry|
21.1. How do I get PyGTK running on MS Windows?
The easiest way to install PyGTK is by following these steps:
- Install Python 2.4 or greater for Microsoft Windows from the Python website [www.python.org] .
- Install the GTK+ 2.10 developer runtime from the GTK+/Glade for Win32 project website [sourceforge.net] or use the (more up-to-date) GTK+ stack bundle provided by the GTK+ project linked from [pygtk.org]
- Install PyCairo, PyGobject and PyGTK installers from the PyGTK project website [pygtk.org] , note that you need them all installed to get PyGTK working.
To check if everything is working correctly, run this script from a file or inside the Python interactive console:
import gtk window = gtk.Window() window.set_title("PyGTK Test Window") window.connect("destroy", gtk.main_quit) window.show_all() gtk.main()NOTE: Be sure to check if you already have a GTK+ 2.10 runtime installed, this may cause conflicts with others applications using the GTK+ runtime, like GIMP.
There are some older versions of pygtk still available:
- Alexandre Fayolle has made a Windows installer for PyGTK and Python 1.5, 2.0 and 2.1 that is available from [ftp.logilab.org] . Alexandre's installers are also based on source code changes by Hans Breuer, as described below.
- Hans Breuer keeps a source code patch and Python 2.0 binaries at his GTK+ ports page at [hans.breuer.org] [There are all sorts of Win32 ports and goodies on that page, so check it out if you are chained to Windows]. On that same page you can also find a port of libglade for Win32 that you can use, additionally.