aLbAc
aLbAc

Reputation: 397

Error when compiling biopython1.65: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I am trying to install biopython 1.65 in debian. I have the dependencies Numpy and Scipy. When I try to build it, it fails:

python setup.py build

running build running build_py running build_ext building 'Bio.cpairwise2' extension 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: No such file or directory #include "Python.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Somebody know how I can solve it?

Many thanks

Upvotes: 0

Views: 1167

Answers (2)

Mike
Mike

Reputation: 643

Had the same issue on Fedora, what helped was:

yum install python-devel

Upvotes: 1

gengisdave
gengisdave

Reputation: 2050

#include "Python.h"

tells the preprocessor to search a local file, and if it doesn't exists there, the preprocessor changes it to

#include <Python.h>

which should be located in /usr/include/python2.7 (which is passed as argument to gcc). Many Linux distros don't have header files installed by default, so you have to install it manually.

Header files for python2.7 are shipped with package libpython2.7-dev

You can find which package to install by searching it with aptitude, synaptic or apt-cache search adding dev after the package name (in that case python dev); the name could be different than the installed one.

Upvotes: 1

Related Questions