红联Linux门户
Linux帮助

ghmm在Linux上安装

发布时间:2017-02-07 09:49:26来源:linux网站作者:cheungmine
1)先安装pcre, libxml2
rhel6:
yum install pcre-devel  
yum install libxml2  
yum install libxml2-devel
ubuntu:
sudo apt-get install libpcre3 libpcre3-dev
你可能还需要安装  
sudo apt-get install openssl libssl-dev  
sudo apt-get install automake  
sudo apt-get install libxml2-dev  
sudo apt-get install pkg-config
 
2)再安装swig
ftp://pub:pub@pepstack.com/tarball/swig-3.0.10.tgz
./configure  
make  
sudo make install  
 
3)安装ghmm
从下面的网址下载。原网站的代码里面含有很多错误。我都fix掉了。
ftp://pub:pub@pepstack.com/tarball/ghmm-0.9rc3-fix.tgz
cd ghmm
sh autogen.sh
vi ./configure
在15003行,修改:
$RM "$cfgfile"
为:
$RM -f "$cfgfile"
./configure
make
sudo make install
或者:
cd ghmm  
sh autogen.sh  
./configure  
make  
sudo make install  
cd ghmmwrapper  
python2.7 setup.py build  
sudo python2.7 setup.py install
如果是anaconda2环境,则:
/opt/anaconda2/bin/python setup.py build  
sudo /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了!
 
本文永久更新地址:http://www.linuxdiyf.com/linux/28201.html