I am relatively new to python. I am using Enthought Canopy for my work. After importing f2py
from numpy
, I keep on running into the invalid syntax error when trying to execute:
f2py -m (modname) -c --fcompiler=gfortran (prog.f90)
Needless to say, I have gfortran
installed, and the program is present in the working directory. Even trying to run
f2py -c --help-fcompiler
as recommended somewhere on the net leads to an error saying : name 'c' is not defined
.
On typing f2py:
module 'numpy.f2py' from 'C:\Users\acer\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.0.3.1262.win-x86_64\lib\site-packages\numpy\f2py\__init__.pyc'
which indicates that f2py is installed. Could anyone have an idea where I am going wrong?