Webkit (Python + GTK) on Debian Lenny

Note: an alternative to all of these arduous/sketchy steps is simply to go with an older version of pywebkitgtk, like version 1.0.2… but that’s almost 2 years old at this point. I’ll take the newer stuff.

No biggie, just apt-get it.

I used 1.1.10; Debian Lenny has 1.0-1 which is not supported by pywebkitgtk-1.1.7
( instructions at http://trac.webkit.org/wiki/BuildingGtk#BuildandInstall )

make install

PS this took about 40 minutes to compile (on a VM)

A few dependency issues that can be solved by searching for the -dev packages… except for libsoup. I had to uninstall it and seek out 2.25.91 and compile/install it manually. I tried being a jerk and changing configure to accept debian’s version. Don’t bother.


gtk-doc-tools[debian], ¬†libsoup[2.25.91:manual,–without-gnome],

(Used 1.1.6. Was aiming for 1.1.7 but they didn’t update their dependencies or something… it does not work with webkit 1.1.10… which is too bad because I just do not have the time to hunt down the LCD and compile it at this time)

make install

pretty swift installation here.

Making python go…

If you installed webkit with your package manager be sure to remove it or this won’t really work. For some reason my python installation doesn’t know to search in /usr/local/…. so I have to set the PYTHONPATH manually…

PYTHONPATH=/usr/local/lib/python2.5/site-packages/webkit-1.0/ ipython

At this point, you can check out this rudimentary example somebody left on Stack Overflow:

import gtk
import webkit

view = webkit.WebView()

sw = gtk.ScrolledWindow()

win = gtk.Window(gtk.WINDOW_TOPLEVEL)


…. And that works and concludes the scope of this article. However I expect to update this according to later versions of these packages.


About andyortlieb

I often find myself figuring out some niche oddities, only to find myself stuck on those same problems a year later due to my wide yet thin activity in certain topics related to my career and hobbies. This blog is where I document these nuances (or nuisances) to ease my pain the second time around, and hopefully that of some other fellow desperate internet scouts.
This entry was posted in Programming and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s