Please note: this project is inactive since early 2006

Installation Instructions

Author: S├ębastien Bigaret <>
Version: 975


The framework depends on four other python packages, plus one or more python adaptors to connect to your database server. Additionally you'll need to have a running database server (either postgresql, mysql or oracle; sqlite does not need any server) --we do not cover here the installation of a database server, please refer to their respective documentation for installation details.

Unless explicitely stated, all installation can be made by unpacking their source distribution, cd-ing to the unpacked directory and then use the standard python package distutils with command-line like:

python ./ install [--prefix=$HOME]

You can specify --prefix if you want to install the packages in an other location than the standard one.

This is what we will call Installation: standard distutils in the rest of this document.


This document is divided into two parts. The first one lists all required packages that needs to be installed. The second ones deals with python database adaptors, and you'll choose which one(s) you'll install depending on the database server you want to connect to.

Needed dependencies

Modeling Framework

The framework can be downloaded from

Unless you already have Cheetah installed (it does not need to be installed before), you'll get the following message:

sh: cheetah-compile: command not found
Warning: compilation of cheetah templates failed: they may be absent, or cheetah-compile is not available.
=> Using the already compiled templates
Press ENTER to continue, CTRL-C to abort
  • if you're running python 2.1 or python2.2, you must install the appropriate version of Cheetah before continuing; the pre-compiled versions shipped with the framework are not compatible with cheetah versions running on py2.1/2.2.
  • otherwise, you can safely ignore the warning and press ENTER, installation will continue.

NotificationFramework v0.6

The NotificationFramework can be downloaded from

Installation: standard distutils.

Cheetah Templates

  • If you're running python v2.1 or 2.2, you must use Cheetah v0.9.15
  • Otherwise, get the latest cheetah package (v2.0rc6 at the time I write this)

Get it here:

Installation: standard distutils. mx Extensions for Python v2.0.6

Download this from:

Installation: standard distutils.

Note: wait until the end of the installation process before removing the directory; you may need it when installing a db-adaptor (such as psycopg for Postgresql).

spark v0.6.1

Spark homepage is at:

Important: do NOT install v0.7+, it will not work, please use v0.6.1 which is at:

Unpack the source distribution, then simply copy the file somewhere in your python path (for example, in /usr/lib/python2.x/site-packages/ or in your $HOME/lib/python2.x/site-packages/).

PyXML v0.8.4

Obtain your copy of PyXML at

Installation: standard distutils.

Database specifics

The rest of the document addresses installation of specific python adaptors. You do not have to install all of them: simply choose at least one in the list of possible python adaptors for the database server you want to connect to.


The only supported python db-adaptor is MySQL-python, currently v1.2.1

You'll find it at:

Installation: standard distutils.


The only supported python db-adaptor is DCOracle2, currently v1.3beta.

You'll find it at:

Installation: see the INSTALL file distributed with DCOracle2.


Three python db-adaptors are supported, Either:

  • psycopg, at

    Installation: psycopg uses the standard scheme ./configure && make. However, depending on your installation, you may need to specify where the C headers for postgresql and egenix-datetime are located. Example:

    ./configure --with-postgres-includes=/usr/include/postgresql \
                --with-mxdatetime-includes=/tmp/egenix-mx-base-2.0.5/mx/DateTime/mxDateTime \
     cp <somewhere in your $PYTHONPATH>

    (here the egenix extensions for Python where unpacked and installed from /tmp).

  • PyGreSQL: The last release can be found at

    Installation: standard distutils.

    Note 1:

    Depending on your installation, ./ will or will not find the header file for postgresql. If it fails on lines like:

    gcc -g -O2 -Wall -Wstrict-prototypes -fPIC \
        -I/usr/include/pgsql -I/usr/local/include/python2.1 \
        -c pgmodule.c -o build/temp.linux-i686-2.1/pgmodule.o

    correct it by hand by including the correct include-path (with option -I. For example, on my machine, I need to change it to:

    gcc -g -O2 -Wall -Wstrict-prototypes -fPIC \
        -I/usr/include/postgresql -I/usr/include/postgresql/server 
        -I/usr/local/include/python2.1 \
        -c pgmodule.c -o build/temp.linux-i686-2.1/pgmodule.o

    Note 2:

    If you then get errors when using it, with errors like:

    _pg.error:ERROR:  Attribute "typprtlen" not found

    you need to patch, here is the patch:

    --- Sun Aug 10 18:52:28 2003
    +++     Sun Aug 10 18:52:35 2003
    @@ -147,7 +147,7 @@
                            return self.__type_cache[oid]
    -                               "SELECT typname, typprtlen, typlen "
    +                               "SELECT typname, typlen as typprtlen, typlen "
                                    "FROM pg_type WHERE oid = %s" % oid
                            res = self.__source.fetch(1)[0]


  • pyPgSQL v2.4, which you can get at

    Installation: standard distutils.


The only supported python db-adaptor is pysqlite, currently v0.5.1. Tested w/ SQLite database server v2.8.15

Get it at:

Installation: standard distutils.


Depending on your local installation, the standard may be unable to locate the header files for sqlite, and the libraries as well. If this is the case, you'll get a message like:

gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/sqlite -I/usr/local/include/python2.1 -c _sqlite.c -o build/temp.linux-i686-2.1/_sqlite.o
_sqlite.c:30: sqlite.h: No such file or directory
error: command 'gcc' failed with exit status 1

In this case, you need to locate the header files and the libraries, and modify accordingly. For example, on linux and with sqlite built from source in /home/user/sqlite_build, you'll make the following changes:

if sys.platform in ("linux-i386", "linux2"): # most Linux
    include_dirs = ['/usr/include/sqlite', '/home/user/sqlite_build' ]
    library_dirs = ['/usr/lib/', '/home/user/sqlite_build/.libs' ]

Note 2:

Verify your pysqlite installation:

>>> import pysqlite

If you get a traceback saying:

ImportError: cannot open shared object file: No such file or directory

you forgot to put the sqlite libraries (located in sqlite_build/.libs if you built sqlite in directory sqlite_build/) where your system can find it. Either move them where they should be, or (unix) add this .libs directory in the environment variable LD_LIBRARY_PATH.