Programming is a wonderful mix of art and science; source code is both a poem and a math problem. It should be as simple and elegant as it is functional and fast. This blog is about that (along with whatever else I feel like writing about).

Tuesday, June 06, 2006

Installing TurboGears on Ubuntu

I recently came across a new web framework called TurboGears that I think seems pretty interesting.

The basic concept is to integrate several different elements of a framework into one simple, easy install. It uses Python's SQLObject to interact with the database (SQLite, MySQL, PostgreSQL, and Firebird are supported), Kid for templating, the MochiKit Javascript library, and CherryPy for the actual server functionality. They attempt to blend front-end and back-end development in a way that seems like it would allow a developer to be much more productive. Anyhow, it looked good to me and I decided to install it.

The installation is supposed to be easy, and for the most part it is. However, at least if you're using Ubuntu Linux (I'm running the newly released Dapper Drake), there are a few things you need to make sure you have installed.

First, you need python2.4, and python2.4-dev, and libc6-dev. These can all be gotten from the apt repositories.

sudo apt-get install python2.4-dev libc6-dev

should do it for you.

Then you simply follow the instructions here, which I will summarize:

1. Download the ez_setup.py script.
2. Run sudo python ez_setup.py -f http://www.turbogears.org/download/index.html --script-dir /usr/local/bin TurboGears


After that, it should just blow through the installation and you'll be ready to rock. Now I'm off to see what I can do with it!