Requirements and Installation

The PuppyIR framework is Python-based and requires, in addition to Python itself, several external dependencies. The framework can either be installed as a standalone service, or combined with the Django web application framework to build web services. The requirements, both basic and those required for additional functionality, are detailed in this section.

Note: if you are running MacOS X, please ensure that you have X-Code installed (either Version 3 or 4; this may be included on your install disc). This is required as several of the dependencies use X-Code’s C compiler.

PuppyIR and MacPorts

For developers using Mac OS X, MacPorts can be used to install all the PuppyIR framework requirements - apart from Whoosh. If you wish to install these using MacPorts please ensure that you install the ‘py27’ versions. Please consult the MacPorts documentation for how to use MacPorts and then install all the basic and extra requirements (if required) using their port versions. Following this, install Whoosh (again if you require it) using the instructions detailed later in this section.

The one exception to the naming convention of ‘py27’ is setuptools, which has the Port name ‘py-setuptools’.

Basic Requirements

The basic PuppyIR framework requires all of the following to be installed:

Extra Requirements

The following external dependencies are only required if you intend to do any of the development tasks detailed below.

To create web services using the Django framework and/or to run the various prototypes and demonstrators:

To run the prototype services in the PuppyIR framework (specifically the JuSe prototype):

If you require the use of the spelling modifier install Enchant:

If you require the use of a full text indexer:

If you wish to use the ‘SuitabilityFilter’ [1] to filter results and/or make use of Strathclyde University’s work in ‘trunk/interfaces’ (see The structure and the PuppyIR repository for more on the structure of the repository) you will need to install Java:

  • Java - this site also contains installation instructions for Java.

Basic Installation

The following sections provide instructions on installing each of the requirements (as detailed in Basic Requirements).

Install Python

If your system does not have Python installed, or you have an earlier version, you can find the latest 2.7 branch of Python here. Follow the installation instructions for your own operating system.

At present, Python 3.x is not supported and may cause problems if installed. You can discover your current version of Python by launching a command prompt and typing the command ‘python’. The version number should be displayed as shown below. If Python 3.0+ is installed, please install the earlier version (the 2.7 branch) to run PuppyIR.

$ python
Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Install Setuptools

This allows several of the dependencies to be installed using the methods detailed in the following sections.

Download the source from http://pypi.python.org/pypi/setuptools

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Install Universal Feed Parser

This allows PuppyIR to parse RSS and Atom feeds.

Download the source from http://code.google.com/p/feedparser/

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Install lxml

This allows PuppyIR to parse XML files.

Download the source from http://pypi.python.org/pypi/lxml/

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Install BeautifulSoup

This is a HTML/XML parser, one of its main functions is handling tree traversal automatically.

Download the source from http://www.crummy.com/software/BeautifulSoup/#Download

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Install PuppyIR

Download the latest stable release from http://sourceforge.net/projects/puppyir/files/release/

$ cd path/to/puppyir
$ python setup.py install # may require 'sudo'

Alternatively, the very latest release - the development version - can be checked out of the repository:

$ svn export https://puppyir.svn.sourceforge.net/svnroot/puppyir/trunk/framework puppyir
$ cd puppyir
$ python setup.py install # may require 'sudo'

Installing the Extras

The following sections provide instructions on installing each of the extra requirements (as detailed in Extra Requirements).

Install Django

(Only required if building web services)

Django is a Python based web framework designed to build web applications quickly, installing this allows for web applications to be developed using the PuppyIR framework.

Download source from https://www.djangoproject.com/download/

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Install Python Imaging Library (PIL)

(Only required for the JuSe prototype)

This is a library that provides allows various image processing tasks to be done on a large variety of image formats.

Download the source from http://www.pythonware.com/products/pil/

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Install Enchant

(Only required if using the Spelling query modifier)

This is a library that checks the spelling of words and provides a list of suggested correct spellings.

It requires enchant library (version 1.5.0 or greater) which can be downloaded at http://www.abisource.com/projects/enchant/

Then download Enchant for Python from http://packages.python.org/pyenchant/

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Install Whoosh

(Only required for local full text indexing)

Download source from http://pypi.python.org/pypi/Whoosh/#downloads

$ cd /path/to/source
$ python setup.py install # may require 'sudo'

Footnotes

[1]For the ‘SuitabilityFilter’ to work you need to have java added to your system path; how to go about this varies depending upon the Operating System (OS) you are using - there are many articles on the internet explaining how to do this for all the major OS’s so this is not explained in this documentation.