python - 编译biopython1.65报错: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

标签 python linux debian installation biopython

我正在尝试在 debian 中安装 biopython 1.65。我有依赖项 Numpy 和 Scipy。 当我尝试构建它时,它失败了:

python setup.py 构建

运行构建 运行 build_py 运行 build_ext 构建“Bio.cpairwise2”扩展 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security - fPIC -I/usr/include/python2.7 -c Bio/cpairwise2module.c -o build/temp.linux-x86_64-2.7/Bio/cpairwise2module.o Bio/cpairwise2module.c:12:20: fatal error: Python.h: 没有那个文件或目录 #include "Python.h" ^ 编译终止。 错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为 1

有人知道我该如何解决吗?

非常感谢

最佳答案

#include "Python.h"

告诉预处理器搜索本地文件,如果不存在,预处理器将其更改为

#include <Python.h>

应该位于/usr/include/python2.7 (作为参数传递给 gcc)。许多 Linux 发行版默认没有安装头文件,因此您必须手动安装。

python2.7 的头文件随包裹发货 libpython2.7-dev

您可以通过使用 aptitude 搜索来找到要安装的包。 , synapticapt-cache search添加dev在包名称之后(在这种情况下为 python dev );该名称可能与安装的名称不同。

关于python - 编译biopython1.65报错: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31253835/

相关文章:

python - 缩进错误 : unindent does not match any outer indentation level - tokenize, 第 8 行

python - "ValueError: Length of values does not match length of index"尝试修改 pandas groupby 的列值时

python - 如何根据mysql结果数据使用python中的条件打印数据

python - 删除 str(date) 的前导 0

c++ - 在 C/C++ 项目中查找 "undefined"引用

python - 在 Debian 系统上登录时运行一个简单的 Python TCP 服务器

java - 系统命令无法从程序执行

linux - bash:终端:找不到命令

php - 使用更改配置安装 debian 软件包

linux - 挂载:未知文件系统类型 '0'