我一直试图让f2py在我的Windows 10 64位机器上运行。我正在使用mingw32和gnu95编译器。当我在命令提示符
中运行此命令时python f2py.py -c -m Test2 Test2.f95 --fcompiler=gnu95 --compiler=mingw32
我收到以下消息
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "Test2" sources
f2py options: []
f2py:> C:\Users\heele\AppData\Local\Temp\tmp410mc40f\src.win-amd64-3.6\Test2module.c
creating C:\Users\heele\AppData\Local\Temp\tmp410mc40f\src.win-amd64-3.6
Reading fortran codes...
Reading file 'Test2.f95' (format:free)
Post-processing...
Block: Test2
Block: test
Post-processing (stage 2)...
Building modules...
Building module "Test2"...
Wrote C/API module "Test2" to file "C:\Users\heele\AppData\Local\Temp\tmp410mc40f\src.win-amd64-3.6\Test2module.c"
adding 'C:\Users\heele\AppData\Local\Temp\tmp410mc40f\src.win-amd64-3.6\fortranobject.c' to sources.
adding 'C:\Users\heele\AppData\Local\Temp\tmp410mc40f\src.win-amd64-3.6' to include_dirs.
copying C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\f2py\src\fortranobject.c -> C:\Users\heele\AppData\Local\Temp\tmp410mc40f\src.win-amd64-3.6
copying C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\f2py\src\fortranobject.h -> C:\Users\heele\AppData\Local\Temp\tmp410mc40f\src.win-amd64-3.6
build_src: building npy-pkg config files
running build_ext
Building msvcr library: "C:\Users\heele\AppData\Local\Programs\Python\Python36\libs\libvcruntime140.a" (from C:\Users\heele\AppData\Local\Programs\Python\Python36\vcruntime140.dll)
objdump.exe: C:\Users\heele\AppData\Local\Programs\Python\Python36\vcruntime140.dll: File format not recognized
Traceback (most recent call last):
File "f2py.py", line 28, in <module>
main()
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\f2py\f2py2e.py", line 648, in main
run_compile()
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\f2py\f2py2e.py", line 633, in run_compile
setup(ext_modules=[ext])
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\core.py", line 169, in setup
return old_setup(**new_attr)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\command\build.py", line 47, in run
old_build.run(self)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\command\build_ext.py", line 117, in run
force=self.force)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\ccompiler.py", line 733, in new_compiler
compiler = klass(None, dry_run, force)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 107, in __init__
msvcr_success = build_msvcr_library()
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 399, in build_msvcr_library
generate_def(dll_file, def_file)
File "C:\Users\heele\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 302, in generate_def
raise ValueError("Symbol table not found")
ValueError: Symbol table not found
如果有什么可以做的那就太棒了。到目前为止,我一直在尝试寻找64位编译器,并尝试重新安装所有内容。我还在某处读到没有什么可做的。