dBeker / Faster-RCNN-TensorFlow-Python3

Tensorflow Faster R-CNN for Windows/Linux and Python 3 (3.5/3.6/3.7)
MIT License
612 stars 329 forks source link

Build Error "Python.h: No such file or directory" #89

Closed movie3105 closed 5 years ago

movie3105 commented 5 years ago
python setup.py build_ext --inplace
running build_ext
building 'pycocotools._mask' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I../common -I/usr/include/python3.6m -c pycocotools/_mask.c -o build/temp.linux-x86_64-3.6/pycocotools/_mask.o
pycocotools/_mask.c:27:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:3: recipe for target 'all' failed
make: *** [all] Error 1

can someone tell me how to solve this ?

morpheusthewhite commented 5 years ago

Next time be sure that you cannot solve the issue before posting it

movie3105 commented 5 years ago

This problem appear when i try to build python setup.py build_ext --inplace.

I solved by installing the python-dev package (sudo apt-get install python-dev for Ubuntu/Debian).

My apologize

movie3105 commented 5 years ago

@morpheusthewhite sorry for that