after installing the python-devel
, locate On Terminal(ctrl+shift+t) by locate Python.h
> the result is the file , copy the path and add it to eclipse by the following instructions.
personaly i like to get in the gist of the code so im adding to the compiler includes. but you can add to the linker as well, as mentioned above.
On eclipse :
Project > Properties > C/C++ Build > Settings > ...Compiler(*) > Includes > Include paths (-l)
Directory : paste the path you've located in terminal.
for example/usr/include/python2.7
press OK
see it was added to the list
press OK
.
enjoy
(*)note: if you are compiling c project choose the include under '.. GCC Copmiler'
for C++ '..G++ Compiler'