ghmm在 Linux 上安装

ghmm在 Linux 上安装

http://ghmm.sourceforge.net/documentation.html

http://www.ghmm.org

http://www.comp.leeds.ac.uk/roger/HiddenMarkovModels/html_dev/main.html

1)先安装pcre, libxml2

rhel6:

yum install pcre-develyum install libxml2
yum install libxml2-devel


ubuntu:

sudo apt-get install libpcre3 libpcre3-dev你可能还需要安装sudo apt-get install openssl libssl-devsudo apt-get install automakesudo apt-get install libxml2-devsudo apt-get install pkg-config

2)再安装swig

ftp://pub:[email protected]/tarball/swig-3.0.10.tgz

./configuremakesudo make install

3)安装ghmm

从下面的网址下载。原网站的代码里面含有很多错误。我都fix掉了。

ftp://pub:[email protected]/tarball/ghmm-0.9rc3-fix.tgz

cd ghmmsh autogen.shvi ./configure在15003行,修改:$RM "$cfgfile"为:
$RM -f "$cfgfile"


./configure
make
sudo make install

或者:

cd ghmmsh autogen.sh./configuremakesudo make installcd ghmmwrapperpython2.7 setup.py buildsudo python2.7 setup.py install

如果是anaconda2环境,则:

/opt/anaconda2/bin/python setup.py buildsudo /opt/anaconda2/bin/python setup.py install

最后:

rhel6:

sudo ln -s /usr/local/lib/libghmm.so.1 /usr/lib64/libghmm.so.1

ubuntu:

sudo ln -s /usr/local/lib/libghmm.so.1 /usr/lib/libghmm.so.1

试试吧:

python2.7 -c "import ghmm"

如果是anaconda2:

/opt/anaconda2/bin/python -c "import ghmm"

可以用c或python玩hmm了!

你可能感兴趣的:(linux,ubuntu,python)