Subsections


F. Installing PyCLIPS


F.1 Installation

To install PyCLIPS you should also download the full CLIPS source distribution. You will find a file called CLIPSsrc.zip at the CLIPS download location: you should choose to download this instead of the Unix compressed source, since the setup program itself performs the task of extracting the files to an appropriate directory with the correct line endings. The ZIP file format has been chosen in order to avoid using different extraction methods depending on the host operating system.

PyCLIPS uses distutils or setuptools for its installation. So in all supported systems the module can be easily set up once the whole source has been extracted to a directory and the CLIPS source code has been put in the same place, by means of the following command:

# python setup.py install

In fact recent versions of PyCLIPS will attempt to download the latest supported CLIPS source directly from the PyCLIPS web site if no CLIPS source package is found. Otherwise no attempt to connect to the Internet will be made. The README file provides more up-to-date and detailed information on the setup process.

On Unix, if you have a system-wide Python distribution, your privileges for installation should be the same as the Python owner.

The CLIPS library itself is compiled for a specific platform, since setup.py modifies the setup.h file in the CLIPS distribution.

PyCLIPS is known to build and pass the tests on Linux (x86 and x86_64)F.1, Win32 (many flavours of it have been tested), Sun Solaris with 32-bit gcc, FreeBSD, Mac OS X with Fink and, using a customized build process, has been ported to the Sharp Zaurus (SA-1110) platform.


F.2 Requirements

PyCLIPS requires Python 2.4 or above to function: it uses decorators to check and enforce types where needed, and in some places it also uses modern aspects of the Python API.

At least version 6.23 of CLIPS is required: it allows the definition and use of environments, and the function and macro definitions are more conformant to the ones described in Clips Reference Guide Vol. II: Advanced Programming Guide. Of course features present in CLIPS 6.24 are not available when using the previous CLIPS version, so if there is no particular reason to use it, please compile PyCLIPS with CLIPS 6.24, which also fixes some bugs.



Footnotes

... x86_64)F.1
The x86_64 platforms requires some optional patches to be applied.