Calling Fortran from Python
mangabasi at gmail.com
Wed Apr 4 13:24:01 CEST 2007
Thanks for your prompt response. I think I got a lot closer but no
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']
building extension "sample" sources
Reading fortran codes...
Reading file 'sample.pyf'
Post-processing (stage 2)...
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' 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:
No module named msvccompiler in scipy_distutils, trying from
error: The .NET Framework SDK needs to be installed before building
I think I have a problem with distutils' msvccompiler.py. 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.
More information about the Python-list