歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu中安裝Biopython

Ubuntu中安裝Biopython

日期:2017/2/28 15:34:22   编辑:Linux教程

Biopython是Python的計算分子生物學和生物信息學工具包,它使得python在生物學數據處理中變得更加強大和高效,在Windows中安裝biopython非常簡單,下載之後,雙擊然後一路點下一步就可以了。在Linux中安裝有多種方法,以Ubuntu(10.04)為例:

方法一:使用apt-get install方式安裝

sudo apt-get install python-biopython

只有一行命令,可是這種方法安裝的不是最新版本,很多新的功能不能用,非常不爽,不建議使用這種方法安裝。

方法二:使用easy_install安裝

(1)安裝python-dev,不然會出現Setup script exited with error: command ‘gcc’ failed with exit status 1錯誤

sudo apt-get install python-dev

(2)安裝easy_install工具

sudo apt-get install python-setuptools

(3)安裝biopython

sudo easy_install -f http://biopython.org/DIST/ biopython (DIST/和biopython之間有個空格)

(4) 安裝Numpy

從http://numpy.scipy.org/下載numpy,現在的最新版本是numpy-1.6.1.tar.gz

tar -xzvpf numpy-1.6.1.tar.gz

cd numpy-1.6.1/

python setup.py build

sudo python setup.py install

還可以繼續安裝一些其它的dependencies,如flex,ReportLab等等,暫時不裝,需要的時候再裝也可以。

(4)改為

Download Numpy1.6.1 and unpack it; using the following commands:

wget http://sourceforge.net/projects/numpy/files/NumPy/1.6.1/numpy-1.6.1.tar.gz

tar -zxvf numpy-1.6.1.tar.gz

If the environment variable PYTHONPATH happens to be set, unset it (you may set it again after installing Numpy):

unset PYTHONPATH

The command that unpacks NumPy1.6.1 will have created a directory called "numpy1.6.1". Enter that directory and build the Numpy package with the help of the fortran compiler:

cd numpy-1.6.1/

python3.2 setup.py build --fcompiler=gnu95

Copyright © Linux教程網 All Rights Reserved