python-pcre icon indicating copy to clipboard operation
python-pcre copied to clipboard

python setup.py install fatal error: Python.h: No such file or directory

Open ZhuFengdaaa opened this issue 10 years ago • 1 comments

After I type these command

# python setup.py install

I receive these error message:

running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying python/pcre.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_pcre' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/pcremodule.c -o build/temp.linux-x86_64-2.7/src/pcremodule.o -fno-strict-aliasing
src/pcremodule.c:29:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.

ZhuFengdaaa avatar Jul 02 '15 06:07 ZhuFengdaaa

python-pcre is a Python extension written in C. Such extensions require that you have the python-dev package installed (the package that includes Python headers).

awahlig avatar Jul 07 '15 14:07 awahlig