#环境:
#ubuntu 12.04 LTS 32bit
#GHMM-0.9-rc1
#Python 2.7.3
#IPython 0.12.1
#先安装编译环境
sudo apt-get install build-essential
#安装make工具
sudo apt-get install automake
#安装libtool 不确定是否必需,因为我先安装libtool
sudo apt-get install libtool
#下面正式开始 要sudo不然权限不够
sudo ./autogen.sh
#安装依赖 libxml-2.6.0 这里安装libxml2-dev
#但我多安装了libxml++2.6-2 这个c++版本应是非必需的
sudo apt-get install libxml2-dev
#configure
sudo ./configure
#安装swig 若不打算用Python wrappe, 不用装
sudo apt-get install swig
#编译
sudo make
#安装完成
测试下:
ipython
import ghmm
显示
ImportError : libghmm.so.1: cannot open shared object file: No such file or directory
解决方法:
cd ~
vi .bashrc
#在文件最后添加
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
或者参考:
http://stackoverflow.com/questions/9216059/import-error-ghmm-library