How To Fix: fatal error: Python.h: No such file or directory

 (cd ./brain/psom && make)
make[1]: Entering directory `/home/ubuntu/pyrobot/brain/psom'
(cd csom_src && make _csom.so)
make[2]: Entering directory `/home/ubuntu/pyrobot/brain/psom/csom_src'
gcc -c -g -I -I/usr/include/python2.6 som_pak_wrap.c -I/usr/include/python2.6 -Isom_pak-dev
som_pak_wrap.c:125: fatal error: Python.h: No such file or directory
compilation terminated.
make[2]: *** [som_pak_wrap.o] Error 1
make[2]: Leaving directory `/home/ubuntu/pyrobot/brain/psom/csom_src'
make[1]: *** [csom_src/_csom.so] Error 2
make[1]: Leaving directory `/home/ubuntu/pyrobot/brain/psom'
make: *** [brain/psom] Error 2

To fix

 sudo apt-get install python2.6-dev

26 comments to How To Fix: fatal error: Python.h: No such file or directory

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>