Install pygtk

First, download gtk from

http://www.gtk.org/download-windows.html

I downloaded the all-in-one bundle

http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-bundle_2.16.6-20090911_win32.zip

unzip the file to c:\gtk

Then, I modify windows environment variable PATH by appending C:\gtk\bin to it.  (Right click “My Computer”, click “Properties”,   “Advanced”, “Environment Variables”, edit “path”)
Go to http://www.pygtk.org/downloads.html, download the latest version pycairo, pygobject, pygtk. (I am using python 2.6).

pycairo-1.4.12-2.win32-py2.6.exe

pygobject-2.14.2-2.win32-py2.6.exe

pygtk-2.12.1-3.win32-py2.6.exe

Run them one by one. The python installation on Windows is very easy, they can all find Python 2.6 from registration and automatically install the package to python lib directory.

Now I run python, I can do


import gtk

If possible, I want to try http://code.google.com/p/pywebkitgtk/
However, it seems quite troublesome to build it on windows:
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2008-10/msg01587.html
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2008-10/msg01723.html
http://webkit.org/building/tools.html
http://www.python.org/doc/2.5.2/ext/win-cookbook.html

related http://aruiz.typepad.com/siliconisland/2006/12/allinone_win32_.html

Comments are closed.