Installing the Python Paster Utility on Ubuntu

January 19, 2008 @ 10:53 pm

A few weeks ago, I wanted to develop a few new themes for Plone 3. When I looked around for an article on how to create the base files for a new theme, I found davcovent’s article about how to develop Plone 3 themes. After reading the article, I tried the three bash commands in the article that use the easy_install script to set up ZopeSkel, a tool for creating blank, customizable packages for Zope and Plone. Unfortunately, under Ubuntu, my favorite distribution of Linux, the bash commands did not fully work. Cheetah, a code generation script, wouldn’t compile correctly.

To find out a work-around for this problem, I did a Google search; I was directed to a blog that said that you may have to install the python-cheetah package from your Linux distribution’s repositories. I tried this and it worked very well. Here’s how to do the same:

Firstly, you will want to open up the terminal. In the terminal, you can install ZopeSkel using the following commands:

sudo apt-get install build-essential
sudo apt-get install python-cheetah
wget http://peak.telecommunity.com/dist/ez_setup.py
sudo python2.4 ez_setup.py
sudo easy_install ZopeSkel

How does this work? The first line installs essentials required for building programs from source. The second line installs Cheetah from the Ubuntu repositories. It, like the first line, has to be run as root (using the “sudo” command) because Ubuntu locks the install system to non-root users. The second line and third lines install easy_setup. The “python2.4″ command is used rather than the “python” command because Ubuntu (7.10) comes pre-loaded with both Python 2.4 and Python 2.5. The 2.5 version of Python doesn’t work so well with easy_install; you really should use 2.4 to prevent errors from coming up later on. The last command uses the easy_install script to install ZopeSkel.

That’s all there is to it! You can now create themes and other packages using ZopeSkel.

2 Responses to “Installing the Python Paster Utility on Ubuntu”

  1. Gustavo Parente Says:

    Thanks!!
    This is what I was missing!!

  2. Jashan Says:

    I, too, had problems with this. Thanks! Worked like a charm.

Leave a Reply