F2PY problems

Pearu Peterson pearu at cens.ioc.ee
Sat May 4 08:01:52 EDT 2002


On 4 May 2002, Siegfried Gonzi wrote:

> I got the advice to try to force the system to use mingw32-support. The
> scipy-distutils is included with the F2PY distribution, but when I force
> the use of mingw32-support I get the error message that "lib2def" cannot
> be imported. The ming32-support.py file tells me that "lib2def" is
> somehow connected with weave. But the F2PY distriubution does not
> mention any weave libraries. I then deleted the weave part but it is
> clear I get the error message that gcc will possibly fail.

This information might be useful for tracking down the problem. Namely, it
is possible scipy_distutils that comes with F2PY is a bit older than the
latest scipy_distutils and therefore lacking some bits regarding to
Windoza stuff. I suggest that you update scipy_distutils from
www.scipy.org (you need to get it from its CVS repository).

That said, I looked at the scipy CVS and found that mingw32-support
needs lib2def but that is part of the weave package. So, as a quick fix,
get lib2def.py file from the scipy/weave directory and put it into
the f2py2e/scipy_distutils directory and reinstall f2py. This should solve
your problem, I hope.

> Is there an alternative to F2PY?

Well, there is always SWIG, Pyfort, manual wrapping.

Regards,
	Pearu






More information about the Python-list mailing list