"No such file or directory" error with Boost Python "No such file or directory" error with Boost Python python python

"No such file or directory" error with Boost Python


add #include <Python.h> and compile with -I/usr/include/python2.6 or whatever your Python version is.

Do not forget to link it with -lpython2.6 -lboost_python


Although it's quite late, but still, here's my answer:

Make sure you have the libboost-python-dev libraries installed:

sudo apt-get install libboost-python-dev

This did the trick for me.


It looks like you are missing the Python headers (Python.h etc.). Make sure you insteall the -devel or -dev package for your version of Python through the operating system package manager. This should provide the header files...

[Edit: noticed you are on ubuntu so try sudo aptitude install python-dev ]