CLIPS is an important tool for intelligent system design, and CLIPS 6.30 is the latest CLIPS version, and apparently is more optimized than its predecessors. Python is the chosen integration language for pulling many capabilities together, including CLIPS, through the PyCLIPS module. Unfortunately the standard PyCLIPS module is based on CLIPS 6.24, and an upgrade is necessary. This blog post describes how to integrate CLIPS 6.30 with PyCLIPS.
To update PyCLIPS, one has to rebuild and reinstall it from source. Download PyCLIPS source from here, download the CLIPS 6.30 source zip file, and download the patch file, then follow the below steps:
$ tar zxvf pyclips-1.0.6.348.tar.gz $ cd pyclips $ cp ~/Download/CLIPSSrc.zip . $ patch -p1 < ~/Download/support_clips_6.30.diff # You may get patch error; just ignore $ ./setup.py build $ sudo ./setup.py install
This builds and copy a CLIPS share library package to
/usr/local/lib/python2.7/dist-packages/clips
Now you have to update the PYTHONPATH
environment variable to include the above share library path. Generally the PYTHONPATH
variable is defined in ~./bashrc
. Be sure to source the file, like this:
$ source ~./bashrc
To import CLIPS into Python, do:
$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import clips >>>
Now PyCLIPS is ready for use. Read the PyCLIPS user manual for the APIs available.