Calling Fortran from Python

Mangabasi mangabasi at
Wed Apr 4 13:24:01 CEST 2007


Thanks for your prompt response.  I think I got a lot closer but no
cigar yet.

This is the output

C:\fortrandll>f2py -c -m sample sample.pyf sample.for
    define_macros = [('NUMERIC_VERSION', '"\\"24.2\\""')]
    include_dirs = ['C:\\Python24\\include']

running build
running config_fc
running build_src
building extension "sample" sources
creating c:\docume~1\fb\locals~1\temp\tmpcosvgv
creating c:\docume~1\fb\locals~1\temp\tmpcosvgv\src
f2py: sample.pyf
Reading fortran codes...
        Reading file 'sample.pyf'
        Block: sample
                        Block: sample
Post-processing (stage 2)...
Building modules...
        Building module "sample"...
                Constructing wrapper function "sample"...
                  ierr1,ierr2,aout = sample(ain)
        Wrote C/API module "sample" to file "c:\docume~1\fb
  adding 'c:\docume~1\fb\locals~1\temp\tmpcosvgv\src\fortranobject.c'
to sources
  adding 'c:\docume~1\fb\locals~1\temp\tmpcosvgv\src' to include_dirs.
copying C:\python24\lib\site-packages\f2py2e\src\fortranobject.c -> c:
copying C:\python24\lib\site-packages\f2py2e\src\fortranobject.h -> c:
running build_ext
No module named msvccompiler in scipy_distutils, trying from
error: The .NET Framework SDK needs to be installed before building
extensions f
or Python.

I think I have a problem with distutils'  It may be
the MacroExpander in distutils guessing the visual studio path
incorrectly or something related to the registry keys.  Is there a way
to specify the C compiler path to f2py so that it does not rely on the
distutils?  Or maybe I am totally off base here, I don't know.

Any thoughts?

More information about the Python-list mailing list