[Numpy-discussion] f2py-problem fcompiler for f90-files missing
Scott Sinclair
scott.sinclair.za at gmail.com
Tue Apr 7 10:31:10 EDT 2009
> 2009/4/7 Tobias Lindberg <Tobias.Lindberg at byggvetenskaper.lth.se>:
> Background:
> I have installed the Python(xy) package (full) (numpy 1.2.1.2) both on my XP
> and Vista machine. On both these machines I have VS2008 installed as well.
>
> Then I read that one could write like this;
>
> f2py -m test -c test.f90 --compiler=mingw32
>
> Then I got this error;
>
> error: f90 not supported by GnuFCompiler needed for fort_mod.f90
>
> so then I check which fcompilers there were and got this;
>
> Fortran compilers found:
> --fcompiler=gnu GNU Fortran 77 compiler (3.4.5)
> Compilers available for this platform, but not found:
> --fcompiler=absoft Absoft Corp Fortran Compiler
> --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compiler
> --fcompiler=g95 G95 Fortran Compiler
> --fcompiler=gnu95 GNU Fortran 95 compiler
> --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps
> --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps
> and the thing is that I have this g95.py under
> c:\Python25\Lib\site-packages\numpy\distutils\fcompiler\
>
> so why does not this thing wotk? And more important, how can I make it
> work?
g95.py isn't a FORTRAN compiler, it's some code to help NumPy find out
what compilers are available on your system.
Since you seem to have g77 installed, I assume this is part of either
a mingw or cygwin installation on your machine. I suggest using the
relevant package manager (cygwin or mingw setup.exe or whatever) to
find and install g95 or gfortran. You should then be able to compile
FORTRAN90 source code.
If you make sure that you can compile a simple FORTRAN90 program at
the command line before trying f2py, you'll probably have better
luck..
Cheers,
Scott
More information about the NumPy-Discussion
mailing list