使用f2py找不到Python的符号表

时间:2017-02-23 10:51:37

标签: python module f2py

我正在尝试使用F2py从fortran子例程生成python中的模数。

我在CMD中使用以下代码:

f2py -c -m fib1 fib1.f --fcompiler=gnu95 --compiler=mingw32

所以它应该创建一个python模块,但它返回以下错误:

valueError: symbol table not found

我在MingW中安装了一切作为编译器,所以我不知道我现在应该做什么。我剪切了CMD输出:

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 "fib1" sources
f2py options: []
f2py:> c:\users\pmacha~1\appdata\local\temp\tmpdzho8n\src.win-amd64-2.7\fib1module.c
creating c:\users\pmacha~1\appdata\local\temp\tmpdzho8n\src.win-amd64-2.7
Reading fortran codes...
    Reading file 'fib1.f' (format:fix,strict)
Post-processing...
    Block: fib1
            Block: fib
Post-processing (stage 2)...
Building modules...
    Building module "fib1"...
        Constructing wrapper function "fib"...
          a = fib(n)
    Wrote C/API module "fib1" to file "c:\users\pmacha~1\appdata\local\temp\tmpdzho8n\src.win-amd64-2.7\fib1module.c"
  adding 'c:\users\pmacha~1\appdata\local\temp\tmpdzho8n\src.win-amd64-2.7\fortranobject.c' to sources.
  adding 'c:\users\pmacha~1\appdata\local\temp\tmpdzho8n\src.win-amd64-2.7' to include_dirs.
copying C:\Users\pmachado3\AppData\Local\Continuum\Anaconda2\lib\site-packages\numpy\f2py\src\fortranobject.c -> c:\users\pmacha~1\appdata\local\temp\tmpdzho8n\src.win-amd64-2.7
copying C:\Users\pmachado3\AppData\Local\Continuum\Anaconda2\lib\site-packages\numpy\f2py\src\fortranobject.h -> c:\users\pmacha~1\appdata\local\temp\tmpdzho8n\src.win-amd64-2.7
build_src: building npy-pkg config files
running build_ext
Looking for python27.dll
Building import library (arch=AMD64): "C:\Users\pmachado3\AppData\Local\Continuum\Anaconda2\libs\libpython27.a" (from C:\Users\pmachado3\AppData\Local\Continuum\Anaconda2\python27.dll)

有什么建议吗?

0 个答案:

没有答案