[f2py] strange IndexError
Wed, 2 Oct 2002 00:52:24 +0300 (EEST)
On 1 Oct 2002, Christopher Fonnesbeck wrote:
> I have just installed f2py on a new RH8.0 machine, and get the following
> f77 -V -c /tmp/__dummy.f -o /tmp/__dummy.o
> 256: f77: invalid version number format
> detecting SGI Fortran compiler...
> f77 -version
> 256: f77: unrecognized option `-version'
> followed by the following error:
> "/usr/lib/python2.2/site-packages/scipy_distutils/command/build_flib.py", line 651, in find_lib_dir
> if libs == "(null)":
> IndexError: list index out of range
It was a bug in scipy_distutils. It is now fixed in scipy CVS.
> This has not occurred in the past with f2py, so I am wondering if there
> is a simple fix for the problem. The error seems to be coming from the
> class sun_fortran_compiler in build_flib.py, but I am just using g77,
> sot I'm not sure why it is using this class.
If you don't want to bother with upgrading scipy_distutils right now then
you can use
f2py -c --fcompiler=Gnu ...
that should ignore all compiler classes except gnu_fortran_compiler.