问题描述
我正在尝试实现 f2py 的这个示例,“快速而智能的方式”,https://numpy.org/doc/stable/f2py/f2py.getting-started.html#the-quick-and-smart-way
当我运行命令时得到这个错误:
running build
running config_cc
unifing config_cc,config,build_clib,build_ext,build commands --compiler options
running config_fc
unifing config_fc,build commands --fcompiler options
running build_src
build_src
building extension "fib3" sources
f2py options: []
f2py:> C:\Users\Nick\AppData\Local\Temp\tmpq7xlox0i\src.win-amd64-3.6\fib3module.c
creating C:\Users\Nick\AppData\Local\Temp\tmpq7xlox0i\src.win-amd64-3.6
IOError: [Errno 2] No such file or directory: 'fib3.f'. Skipping file "fib3.f".
Reading fortran codes...
Post-processing...
Post-processing (stage 2)...
Building modules...
error: f2py target file 'C:\\Users\\Nick\\AppData\\Local\\Temp\\tmpq7xlox0i\\src.win-amd64-3.6\\fib3module.c' not generated
之前我从这里使用了 Windows 的 MinGW 安装管理器,https://gcc.gnu.org/wiki/GFortranBinaries#Windows 并安装了开发工具包、base、fortran、g++ 和 msys-base 包,我不知道出了什么问题。>
感谢您提供与 f2py 相关的任何建议。
编辑:我使用了后缀 .f90 而不是 .f 并且出现了不同的错误。
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
warning: build_ext: f77_compiler=None is not available.
building 'fib3' extension
error: extension 'fib3' has Fortran sources but no Fortran compiler found
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)