我有一个Fortran程序,并希望在python中执行多个文件。我有2000个输入文件,但是在我的Fortran代码中,我一次只能运行一个文件。我应该如何在python中调用Fortran程序?如何在python中执行Fortran程序
我的脚本:
from numpy import f2py
with open("phase1.f") as sourcefile:
sourcecode = sourcefile.read()
f2py.compile(sourcecode, modulename='add')
错误:
Could not locate executable C:\Users\Vishnu\Anaconda2\python.exe Executable C:\Users\Anaconda2\python.exe does not exist
看来你的Python安装很糟...... –