← Back to team overview

dolfin team mailing list archive

Re: Python Error

 

On Wed, Oct 26, 2005 at 08:51:56AM -0500, Andy Ray Terrel wrote:
> Johan Jansson wrote:
> 
> >On Tue, Oct 25, 2005 at 09:57:00PM -0500, Andy Ray Terrel wrote:
> > 
> >
> >>So I was trying to check out the new pydolfin but when I go to make the 
> >>installation I get the following error while running ./configure:
> >>
> >>checking for Python include path... find: /usr/local/include/python2.3/: 
> >>No such file or directory
> >>find: /usr/local/include/python/: No such file or directory
> >>
> >>configure: error: cannot find Python include path
> >>
> >>
...


> I get that my include folder is here:
> /usr/include/python2.3
> 
> I can't seem to find m4/ac_python_devel.m4 in the directory I get from 
> the cvs.  Is this generated at some point or where should I look.
> 
> Thanks,
> Andy
> 

The "m4" directory should be in the root of the "dolfin" source tree,
i.e. "dolfin/m4"

Now I think I see what goes wrong. This is part of the macro that
figures out the Python path:

# Check for Python include path
AC_MSG_CHECKING([for Python include path])
python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/in\clude/python/" "$python_path/" ; do
	python_path=`find $i -type f -name Python.h -print | sed "1q"`
	if test -n "$python_path" ; then
		break
	fi
done

Where $PYTHON is the full name (including path) of the Python
binary. From what you have mailed it looks like your Python binary is:

/usr/local/bin/python

Is this right?

but you don't seem to have the development files under
/usr/local/include/

So the best solution is probably to remove the Python files in
/usr/local and only use the files in /usr, or to install the
development files under /usr/local as well.

I think it would be better if the macro used the distutils functions
for figuring out the paths, but maybe it's not possible to get all the
needed information with that, I don't know.

Please tell me how it goes.

  Johan




References