Compile fortran module with f2py and Python 3.6 on Windows 10

前端 未结 3 1560

I\'m trying (and failing) to compile a fortran module (specifically igrf12.f from the BGS) using f2py and Python 3.6 on Windows 10. Python was installed using Anaconda 4.4.1

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-31 15:37

    I had the same issue. The top answer helps a lot. I would like to add some comments about the missing DLLs. A useful tool to help you find out which DLLs are missing is Process Monitor. You only need to add a filter python.exe and track which DLLs are failed to load. For me, the following ones are missing:

    • libgcc_s_seh-1.dll
    • libgfortran-5.dll
    • libquadmath-0.dll
    • libwinpthread-1.dll

    I just need to copy them from the bin/ directory of my MinGW toolchain to the same directory of python.exe

提交回复
热议问题