Search code examples
pythonwindowspython-3.xfortranf2py

f2py installation not working under Windows


I am using Python 3.2 under Windows 7. I need some numerical subroutines for my Python script, and I would like to write them in Fortran and use f2py to make them compatible with my script.

As per the f2py documentation, I installed numpy (v1.6.1), then tried running f2py on the command line to check the installation. Windows keeps telling me that "f2py is not recognized as an internal or external command, operable program, or batch file." I tried adding "C:\Python32\Scripts" to my PATH, but that didn't help. (C:\Python32 is my Python installation directory, and is also in my PATH, numpy is also installed here)

What am I doing wrong?


Solution

  • You need to run f2py.py. If you want to omit the .py extension, add .PY to your PATHEXT environment variable.