[Numpy-discussion] fortran 90 compiler problem

Robert Kern robert.kern at gmail.com
Wed Oct 10 17:33:15 EDT 2007


humufr at yahoo.fr wrote:
> This is the log I have when I'm trying to use f2py with a fortran 90 file. 
> The last line seems to tell me that f2py cannot see gfortran and g95 even if 
> it detected them when I installed f2py.
> 
> thanks,
> 
> N.
> 
> gfortran and g95 are installed and I can use them:
> 
>> gfortran
> gfortran: no input files
> 
>> gfortran -c hello.f90
>> ls hello*
> hello.f90 hello.o
> 
>> g95 
> g95: no input files
> 
>> g95 -c hello.f90
>> ls hello*
> hello.f90 hello.o
> 
> and now
> 
>> f2py -c -m hello hello.f90

Tell f2py that you want it to use gfortran instead of the default.

  f2py --fcompiler=gnu95 -c -m hello hello.f90

-- 
Robert Kern

"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 NumPy-Discussion mailing list