Installing amaGama

Want to try amaGama? This will guide you through installing amaGama and its requirements.


amaGama requires the following dependencies:

  • Python 2: 2.6 or later.
  • PostgreSQL: Tested on 8.3 and 8.4.

There are also some dependencies that we strongly recommend to use, but are optional:

  • git: Necessary to get amaGama.
  • virtualenv: Provides an isolated environment or virtualenv.
  • virtualenvwrapper: To ease handling virtualenvs.

Consult the specifics for your operating system in order to get each above package installed successfully.

Setting up a virtualenv

The use of virtualenvs allows to install all the requirements at specific versions without interfering with system-wide packages. To create a virtualenv just run:

$ mkvirtualenv amagama

Getting amaGama

There is no package for amaGama, so you will need to run it from a git checkout:

(amagama) $ git clone
(amagama) $ cd amagama

Installing the requirements

Then install the requirements:

(amagama) $ pip install -r requirements/recommended.txt

After installing the amaGama requirements, you can safely start amaGama installation.

Creating the database

amaGama requires a PostgreSQL database to store translations. So create an empty database, for example doing the following:

$ su root
# su postgres
$ createdb -E UTF-8 amagama


You might see an error like:

createdb: database creation failed: ERROR: new encoding (UTF8) is
incompatible with the encoding of the template database (SQL_ASCII)

This could happen because the database was installed in the “C” locale. This might be fixed by doing the following:

$ createdb -E UTF-8 -T template0 amagama

Adjusting the settings

The next step is to adjust amaGama settings to include the right database connection configuration, and perhaps change any other setting. Check the amaGama settings documentation in order to know how to do it.


One simple change that you should most likely make on a toy installation is to set:

DB_HOST = "localhost"

This is a side effect of how Postgres is installed on Ubuntu and other systems.

Making the commands accessible

Since amaGama is not installed we need to make accessible its commands:

$ export PATH=$(pwd)/bin:$PATH

Preparing the database

The first step after editing the settings is to prepare database tables for each source language you will use (you can add more languages later):

$ amagama-manage initdb -s en -s fr

Next steps

Now that you have managed to install amaGama you will probably want to know how to: