小编Tes*_*sla的帖子

使用英特尔Fortran编译器的f2py

我试图使用f2py将我的python程序与我的Fortran模块连接起来.

我在Win7平台上.

我使用最新的Anaconda 64(1.7)作为Python + NumPy堆栈.

My Fortran编译器是最新的Intel Fortran编译器64(版本14.0.0.103 Build 20130728).

我在执行时遇到了很多问题 f2py -c -m PyModule FortranModule.f90 --fcompiler=intelvem

最后一个,我似乎无法理清的是,看起来像f2py/distutils传递给编译器的标志序列与ifort所期望的不匹配.

调用ifort时,我收到一系列有关未知选项的警告消息.

ifort: command line warning #10006: ignoring unknown option '/LC:\Anaconda\libs'
ifort: command line warning #10006: ignoring unknown option'/LC:\Anaconda\PCbuild\amd64'
ifort: command line warning #10006: ignoring unknown option '/lpython27'
Run Code Online (Sandbox Code Playgroud)

我怀疑这与我最后从链接器获得的错误有关

error LNK2019: unresolved external symbol __imp_PyImport_ImportModule referenced in function _import_array
error LNK2019... and so forth (there are about 30-40 lines like that, with different python modules missing)
Run Code Online (Sandbox Code Playgroud)

它的结论很简单

fatal error LNK1120: 42 unresolved …
Run Code Online (Sandbox Code Playgroud)

fortran distutils f2py python-2.7 intel-fortran

6
推荐指数
1
解决办法
2851
查看次数

标签 统计

distutils ×1

f2py ×1

fortran ×1

intel-fortran ×1

python-2.7 ×1