Installing GHMM

Prerequisites

Download

Please use the version out of the SVN. There are detailed instructions at http://sourceforge.net/svn/?group_id=67094. For the most recent version you may do an anonymous checkout by calling

svn checkout svn://svn.code.sf.net/p/ghmm/code/trunk/ghmm ghmm

Installation

In the ideal case, installation is the same as for all GNU software from source: In the ghmm directory issue the following commands.


> autogen.sh
> ./configure
> make 
> make install
This will install the GHMM into whatever path prefix is default for autoconf on your system. Note that the same prefix is used for installing the Python library, the path for the Python install is not determined by the install location of the first python found on your PATH. That is, if for example /usr/local is the default for autoconf, the ghmm.py will end up in /usr/local/lib/pythonX.Y/site-packages. This will cause an import error if your python is not installed in /usr/local or /usr/local/lib/pythonX.Y/site-packages is not added to your PYTHONPATH environment variable.

If your Python is in a non-standard location for autoconf, you probably want to install into the appropriate site-packages. That is, if the Python interpreter invoked by typing python in your shell is /var/bin/python than most likely its library will be /var/lib/pythonX.Y and all site-specific installs should end up in /var/lib/pythonX.Y/site-packages/ by default.

There is a simple work-around as follows.


> autogen.sh
> ./configure --without-python
> make 
> make install
> cd ghmmwrapper
> python setup.py build
> python setup.py install

Sometimes a more fine-grained control is needed. Then you can specify the prefixes used for installation and the python interpreter to use explicitely.


> autogen.sh
> ./configure --without-python --prefix=/some/path
> make 
> make install
> cd ghmmwrapper
> /some/otherpath/python setup.py build
> /some/otherpath/python setup.py install --prefix=/yetanotherpath/
This might require setting your PYTHONPATH or LD_LIBRARY_PATH environment variable appropriately.

The graphical editor can be installed after installing Gato (see above) just like the Python bindings in ghmmwrapper


> cd ../HMMEd
> /some/otherpath/python setup.py build
> /some/otherpath/python setup.py install --prefix=/yetanotherpath/

Ubuntu installation walkthrough

First make sure you have the prerequisites

sudo apt-get update 
sudo apt-get install build-essential automake autoconf libtool
sudo apt-get install python-dev
sudo apt-get install libxml++2.6-dev
sudo apt-get install swig
Then get the tarball and unpack or checkout from svn and run

cd ghmm
sh autogen.sh
sudo ./configure
sudo make
sudo make install
sudo ldconfig

OS-specific tips

Troubleshooting