Stetl currently only runs with Python 2 (2.7+). Work is underway for Python3 support.

Easiest is to first install the Stetl-dependencies (see below) and then install and maintain Stetl on your system as a Python package (pip is preferred).

(sudo) pip install stetl
easy_install stetl

Alternatively you can download Stetl from Github: by cloning (preferred) or downloading: and then install locally

(sudo) python install

Try the examples first. This should work on Linuxes and Mac OSX.

Windows installation may be more involved depending on your local Python setup. Platform-specific installations below.

You may also want to download the complete .tar.gz distro from PyPi: . This includes the examples and tests.


Since version 1.0.9 Stetl also can be installed and run via Docker. See Install with Docker below.


Thanks to Bas Couwenberg, work is performed to provide Stetl as Debian packages on both Debian and Ubuntu, see details: (Debian) and (Ubuntu, Xenial and later). Stetl is split into 2 packages python-stetl, the Python framework and stetl the command line utility.


Stetl depends on the following Python packages:

  • GDAL bindings for Python
  • psycopg2 (PostgreSQL client)
  • lxml

GDAL requires the native GDAL/OGR tools to be installed.

lxml requires the native (C) libraries:

  • libxslt (required by lxml)
  • libxml2 (required by lxml)

When using the Jinja2 templating filter, Jinja2TemplatingFilter, see

  • Python Jinja2 package

Platform-specific guidelines for dependencies follow next.


Most packages should be able to be installed by apt-get or Python pip or easy_install.

Tip: to get latest versions of GDAL and other Open Source geospatial software, best is to add the UbuntuGIS Repository.

  • Optional: Python package dependencies:

    sudo apt-get install python-setuptools
    sudo apt-get install python-dev
    sudo apt-get install libpq-dev
  • libxml2/libxslt libs are usually already installed. Together with Python lxml the total install for lxml is:

    apt-get of yum install libxml2
    apt-get of yum install libxslt1.1
    apt-get of yum install python-lxml
  • GDAL ( with Python bindings:

    apt-get of yum install gdal-bin
    apt-get of yum install python-gdal
  • the PostgreSQL client library for Python psycopg2:

    sudo easy_install psycopg2
  • Python package argparse if you have Python < 2.7:

    sudo easy_install argparse


Dependencies can best be installed via Homebrew.


Best is to install GDAL and python using the OSGeo4W Installer from

  • Download and run the OSGeo4W Installer
  • Choose Advanced Install
  • On the Select Packages page expand Commandline_Utilities and Select from the list gdal and python
  • (psycopg2??)
  • Install easy_install to allow you to install lxml
  • Download the script
  • Open the OSGeo4W Shell (Start > Programs > OSGeo4W > OSGeo4W > OSGeo4W Shell)
  • Change to the folder that you downloaded to (if you downloaded to C:Temp then run cd C:Temp)
  • Install easy_install by running python
  • To install lxml with easy_install run easy_install lxml

Only Psycopg2 needs explicit installation. Many install via: Once the above has been installed you should have everything required to run Stetl.

Alternatively you may use Portable GIS. Still you will need to manually install psycopg2. See for details.

Test Installation

If you installed via Python ‘pip’ you can check if you run the latest version

stetl -h

You should get meaningful output like

2013-09-16 18:25:12,093 util INFO running with lxml.etree, good!
2013-09-16 18:25:12,100 util INFO running with cStringIO, fabulous!
2013-09-16 18:25:12,122 main INFO Stetl version = 1.0.3
usage: stetl [-h] -c  CONFIG_FILE [-s  CONFIG_SECTION] [-a  CONFIG_ARGS]

Especially check the Stetl version number.

Try running the examples when running with a downloaded distro.

cd examples/basics

Look for any error messages in your output.

Install with Docker

One of the cleanest ways to use Stetl is via Docker. Your environment needs to be setup to use Docker and probably you want to use some tooling like Vagrant. The author uses a combination of VirtualBox with Ubuntu and Vagrant on Mac OSX to run Docker, but this is a bit out of scope here.

Assuming you have a working Docker environment, there are two ways to install Stetl with Docker:

For running Stetl using Docker see Using Docker.