Installing GHMM
Prerequisites
- Recent GCC, recent, working autoconf and automake.
- Libxml2
- Optional: The GHMM is self-contained, but can make use of the
GSL. Note that the GSL is GPL licensed and that will most likely force
your code under the GPL. You need to pass --enable-gsl option
to configure.
- For the optional Python wrappers you need the following. If
building without Python wrapper use the --without-python
option for configure.
- Python version 2.6.x or 2.7.x GHMM is not yet compatible with
Python 3.x releases nor with earlier releases. Note that on many Linux
distributions the default installs are missing header files.
- SWIG, the simplified wrapper
interface generator.
- Optional: If you want to use the editor
HMMEd you need X11 (or equivalent), Tk and Tkinter.
- Optional: If you use the GSL also install the Pygsl
Python bindings for the GSL.
Download
Currently there are no releases. Please use the version out of the
SVN. There are detailed instructions at http://sourceforge.net/svn/?group_id=67094.
An anonymous checkout can simply be done by
svn co https://ghmm.svn.sourceforge.net/svnroot/ghmm/trunk/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.
OS-specific tips
- Mac OS X: 10.6 ships with a broken libtool which breaks the installation (and it also ships with Python 2.5, so you need an update for that). James Howard posted a solution on the mailing list: [Ghmm-list] Compiling in OS X 10.6
- Windows: There is no Windows support. Installing Cygwin should work. Check the mailing list; it seems that some people had success.
- Linux: various distributions are creative about install locations and the scope what actually is installed. You want the developer/header whatever-they-are-called packages in addition to that. Note that specific distributions also omit part of the Python standard library (Ubuntu and the Python profiler).
- C++: We used to have C++ bindings emulating the semantics of the Python interface, but we lost interest after it became clear that Python plus C is nicer and as fast.
Troubleshooting
- There are more options to configure, check configure --help.
- There is anecdotal evidence that adding search paths to ghmm/ghmmwrapper/setup.py
is the easiest way to get around install problems in really creative installations.
- If you don't have
root access, installing somewhere in your home directory by specifying the --prefix arguments
seems to be the path of least resistence. Then you need to set PYTHONPATH, LD_LIBRARY_PATH and possibly PATH accordingly in your .bashrc.