← Back to team overview

dolfin team mailing list archive

Re: Python.h: No such file or directory

 

On Wed, Oct 21, 2009 at 3:02 AM, Aron Wahlberg <aron.wahlberg@xxxxxxxxx> wrote:
> Hi,
>
> I'm building dolfin on Mac Snow Leopard. Even tough I know Python.h is
> found in the default preinstalled python26, which I use (/System/
> Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/
> Python.h), I get complaints about that particular file:
>
> dolfin/swig/cpp_wrap.cc:150:20: fatal error: Python.h: No such file or
> directory
>
> How can I tell swig I have the file? Or what to do?

pkg-config is used to tell where Python.h is located. Running 'scons
configure' will automatically generate a file python-2.pc (under
scons/pkgconfig) that in your case should contain something like this:

   Cflags: -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6

You might already have a copy of python-2.pc in your PKG_CONFIG_PATH
and in that case 'scons configure' will not generate a new one (SyFi
also installs python-2.pc). You can safely delete any old python-2.pc
files and let 'scons configure' generate a new one with hopefully the
correct contents.

I Hope this will help.

Johannes


References