gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 09:31:07 24 4
gpt4 key购买 nike

我正在尝试在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com