[SciPy-user] F2PY stopped working with new scipy

Robert Kern robert.kern at gmail.com
Fri Apr 7 10:50:47 CDT 2006

Neilen Marais wrote:
> Hi
> I'm using F2PY with the intel fortran compiler under Ubunty Breezy (05.10)
> AMD64 to wrap some F90 code. If I use the old scipy (package version
> 0.3.2-2ubuntu1) with:
> F2PY Version:2.46.243_2020
> scipy.distutils Version: 0.3.2
> the following test command works as expected:
> $ f2py --fcompiler=intel -m testmod -c test_data.f90 test_prog.f90
> Before I install new scipy, I removed all the f2py files , since it is now
> included with scipy. I also removed the ubuntu scipy package.
> 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
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.

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