[SciPy-user] F2PY stopped working with new scipy

Robert Kern robert.kern at gmail.com
Mon Apr 10 11:45:32 CDT 2006

Neilen Marais wrote:
> Hi Robert
> On Fri, 07 Apr 2006 10:50:47 -0500, Robert Kern wrote:
>>Neilen Marais wrote:
>>>After installing numpy-0.9.6 and scipy-0.4.8, trying to generate the wrappers
>>>results in the following output:
>>>$ f2py --fcompiler=intel -m testmod -c test_data.f90 test_prog.f90
>>>  adding '/tmp/tmp_cZX2X/src/testmod-f2pywrappers2.f90' to sources.  running
>>>  build_ext customize UnixCCompiler customize UnixCCompiler using build_ext
>>>  Could not locate executable efort Could not locate executable efc warning:
>>>  build_ext: fcompiler=intel is not available.
>>This is the problem. The first thing to check is that efc is on your PATH. The
> efc? AFAIK the official driver name for intel fortran is ifort, and this is
> indeed on my path.

Well, according to the error message, it was looking for efort and efc for some
reason. Looking at the code (numpy/distutils/fcompiler/intel.py), it appears
that the IntelItaniamFCompiler class looks for efort and efc; however, that
compiler is supposed to be specified by intele, not intel.

> An older name is ifc, though it complains about that command
> name being deprecated:
> brick at genugtig:/usr/local/src/numpy-0.9.6
> $ ifc
> ifc: warning: The Intel Fortran driver is now named ifort.  You can suppress
> this message with '-quiet'
> ifort: Command line error: no files specified; for help type "ifort -help"
> brick at genugtig:/usr/local/src/numpy-0.9.6
> $ efc
> bash: efc: command not found
> brick at genugtig:/usr/local/src/numpy-0.9.6
> $ ifort -v
> Version 9.0
> brick at genugtig:/usr/local/src/numpy-0.9.6
> I also added symbolic links for efc and efort. Still no-go though.
>>second thing to check is the version string of the compiler. numpy.distutils
>>uses regexes to extract the version of the compiler from the version string. It
>>is possible that you are using a version of the compiler that has a different
>>string than we are expecting.
> How can I obtain this test string? It did work with the older version
> of scipy/f2py, so this may be some sort of regression.

The regexes are the version_pattern class attributes in the file intel.py given

Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list