I apologize for this newbie question. I am currently looking to embedded a small python code into a main C code. It has been suggested to use
#include <Python.h> at the header. I have already done so and that my Ubuntu12-0.4 machine also has
locate Python.h, I got
However, when I include Python.h into my C program, it still gives me
fatal error: python.h: No such file or directory.
So Python.h hasn't been include in the Makefile. But I have no idea how to do so. Looking into my package list I have:
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = MIGRATION README.rst libmodbus.spec
SUBDIRS = src doc tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmodbus.pc
the first line says
# Makefile.in generated by automake 1.14.1 from Makefile.am.
Should I also include the complete description of
Makefile.in to here? I am not sure how should I proceed.
I've got the same error, try this:
gcc -I/usr/include/python2.7 yoursource.c -o yourprogram
This solution is from: Can't find Python.h file on CentOS