Skip to content


Subversion checkout URL

You can clone with
Download ZIP


earney edited this page · 5 revisions

Installing Pyjamas and Pyjamas Desktop on Ubuntu 11.10


This page explains how to install and run Pyjamas and Pyjamas Desktop with WebKitGTK on Ubuntu.

Getting And Building Pyjamas

$ git clone

This should create a directory pyjamas/ containing the current development source code.

Run to create the bin/ directory, containing wrapper programs necessary to compile Pyjamas applications, and also to create the file pyjd/ for pyjamas-desktop integration:

$ cd pyjamas
pyjamas$ python

It is useful to add the bin/ directory to your PATH variable (and/or to ~/.bashrc), for example:

pyjamas$ export PATH=`pwd`/bin:$PATH

Testing Pyjamas

A first test can be done now:

pyjamas$ cd examples/helloworld/
pyjamas/examples/helloworld$ ./

This generates a directory output/ containing Hello.html and a lot of other files and directories.

Now you can open output/Hello.html in firefox:

pyjamas/examples/helloworld$ firefox output/Hello.html

Now go back to the pyjamas/ root directory for the next step:

pyjamas/examples/helloworld$ cd ../..

Setting Up Pyjamas-Desktop: Webkit


pythonwebkit doesn't support Canvas applications. If you intend to run an app that uses Canvas, instead try xulrunner.

Detailed instructions are available at

Install libwebkit for it's dependencies, and then remove it:

sudo apt-get build-dep libwebkit-dev
sudo apt-get install libwebkit-dev
sudo apt-get remove libwebkit-dev

Other required packages:

sudo apt-get install build-essential
sudo apt-get install python-dev python-ply python-gtk2-dev
sudo apt-get install gnome-common gtk-doc-tools libxml2-dev

Get the pythonwebkit code:

git clone --depth 1 git://
cd pythonwebkit
git checkout python_codegen

Compile the sources:

mkdir build
cd build

sudo make install
cd ../..

Update the shared libraries:

sudo ldconfig

Quick sanity check that python can import pywebkitgkt:

>>> import pywebkitgtk

If there is a problem here it may be helpful to check /etc/ to ensure it contains /usr/local/lib, and also to run ldconfig -p to double-check that the python webkit library is listed. Also consider doing ldd /usr/local/lib/ and double-check that the library can find all its runtime libs.

Create the pyjdrc file:

mkdir ~/.pyjd
vi ~/.pyjd/pyjdrc

Save the following 2 lines in ~/.pyjd/pyjdrc:


Setup Pyjamas:

cd pyjamas
python build
sudo python install

Finally, test the Mail application using Pyjamas Desktop:

cd examples/mail

Running The Test Suite

In pyjamas/examples/libtest, follow the README.

See also

Something went wrong with that request. Please try again.