KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm attempting to build a Python extension from Fortran source using Numpy's f2py.py script. I'm following the steps from http://www.scipy.org/F2PY_Windows ( web archive ). My system is Windows 7 64-bit, and I primarily use Python 2.7.3 [MSC v.1500 64 bit (AMD64)]. I have Numpy-MKL 1.7.1, from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Here is what I've tried: Choose a Fortran compiler. Since I'm using 64-bit Python, a 64-bit Fortran compiler is required. From MinGW-w64 , I've tried a few of the personal builds. Open a new cmd.exe shell, and edit the path to where I extracted the GCC compilers, i.e.: set PATH=%PATH%;c:\gnu\mingw64\bin set C_INCLUDE_PATH=C:\gnu\mingw64\include Try the f2py.py build with this command: C:\Python27\python.exe C:\Python27\Scripts\f2py.py -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr90 -m foo foo.f90 The output is (removing noise lines at <--snip--> ): running build <--snip--> Reading fortran codes... Reading file 'foo.f90' (format:free) Post-processing... Block: foo Block: hello Post-processing (stage 2)... Building modules... Building module "foo"... Constructing wrapper function "hello"... hello() Wrote C/API module "foo" to file "c:\users\mtoews\appdata\local\temp\tmpjr6qop\src.win-amd64-2.7\foomodule.c" adding 'c:\users\mtoews\appdata\local\temp\tmpjr6qop\src.win-amd64-2.7\fortranobject.c' to sources. adding 'c:\
Tags (comma-separated)
Save Edits
Cancel