2013-05-30 41 views
0

我正在嘗試安裝Biopython 1.61。我以root身份登錄到bash終端。我使用的是Mageia 2.0,我更新了操作系統上的所有軟件包/程序(使用urpmi update -a)。Mageia上的Biopython生成錯誤

我提取源,然後跑python setup.py build,其中有兩個誤區:

FAIL: test_protein_16130152 (test_SeqIO_online.EntrezTests) 
Bio.Entrez.efetch(protein, 16130152, ...) 
---------------------------------------------------------------------- 
Traceback (most recent call last): 
    File "test_SeqIO_online.py", line 77, in <lambda> 
    method = lambda x : x.simple(d, f, e, l, c) 
    File "test_SeqIO_online.py", line 65, in simple 
    self.assertEqual(seguid(record.seq), checksum) 
AssertionError: 'NT/aFiTXyD/7KixizZ9sq2FcniU' != 'fCjcjMFeGIrilHAn6h+yju267lg' 

====================================================================== 
ERROR: test_doctests (test_Tutorial.TutorialTestCase) 
Run tutorial doctests. 
---------------------------------------------------------------------- 
Traceback (most recent call last): 
    File "test_Tutorial.py", line 152, in test_doctests 
ValueError: 4 Tutorial doctests failed: test_from_line_05671, test_from_line_06030, test_from_line_06190, test_from_line_06479 

然後我跑python setup.py install,但是失敗了。我更新了我的python(urpmi install lib64python-devel)和我的gcc,但它已經是最新的。

這是我從python setup.py install得到錯誤:

[[email protected] biopython-1.61]# python setup.py install 
running install 
running build 
running build_py 
warning: build_py_biopython: byte-compiling is disabled, skipping. 

running build_ext 
building 'Bio.Cluster.cluster' extension 
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -g -fPIC -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c Bio/Cluster/clustermodule.c -o build/temp.linux-x86_64-2.7/Bio/Cluster/clustermodule.o 
Bio/Cluster/clustermodule.c:2:31: fatal error: numpy/arrayobject.h: No such file or directory 
compilation terminated. 
error: command 'gcc' failed with exit status 1 

回答

2

單元測試失敗已經被固定在Biopython本身。

編譯器錯誤提示您缺少NumPy頭文件,通常包含在OS軟件包管理器中的單獨包中,名爲numpy-dev或numpy-devel。