您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

python – 如何让setup.py测试使用特定的fortran编译器?

5b51 2022/1/14 8:21:17 python 字数 5224 阅读 496 来源 www.jb51.cc/python

我正在尝试测试包含一些f90文件的package.如果我构建或安装并指定fortran编译器,它可以正常工作.但是,当我尝试测试时,我收到以下错误:C:\Users\jsalvatier\workspace\scikits.bvp_solver>python setup.py config_fc --fcompiler=gfortran test ru

概述

我正在尝试测试包含一些f90文件package.如果我构建或安装并指定fortran编译器,它可以正常工作.但是,当我尝试测试时,我收到以下错误:@H_301_2@

@H_301_2@

C:\Users\jsalvatier\workspace\scikits.bvp_solver>python setup.py config_fc --fcompiler=gfortran test
running config_fc
unifing config_fc,config,build_clib,build_ext,build commands --fcompiler options
running test
running egg_info
running build_src
build_src
building extension "scikits.bvp_solver.bvp_solverf" sources
f2py options: []
  adding 'build\src.win32-2.6\fortranobject.c' to sources.
  adding 'build\src.win32-2.6' to include_dirs.
  adding 'build\src.win32-2.6\scikits\bvp_solver\lib\bvp_solverf-f2pywrappers2.f90' to sources.
building data_files sources
build_src: building npy-pkg config files
writing scikits.bvp_solver.egg-info\PKG-INFO
writing namespace_packages to scikits.bvp_solver.egg-info\namespace_packages.txt
writing top-level names to scikits.bvp_solver.egg-info\top_level.txt
writing dependency_links to scikits.bvp_solver.egg-info\dependency_links.txt
reading manifest file 'scikits.bvp_solver.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'scikits.bvp_solver.egg-info\SOURCES.txt'
running build_ext
customize Mingw32CCompiler
customize Mingw32CCompiler using build_ext
customize GnuFCompiler
Found executable C:\mingw\bin\g77.exe
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
Found executable C:\mingw\bin\g77.exe
customize GnuFCompiler
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
customize GnuFCompiler using build_ext
building 'scikits.bvp_solver.bvp_solverf' extension
compiling C sources
C compiler: gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes

compile options: '-Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c build\src.win32-2.6\scikits\bvp_solver\lib\bvp_solverfmodule.c -o build\temp.win32-2.6\Release\build\src.win32-2.6\scikits\bvp_solver\lib\bvp_solverfmodule.o
Found executable C:\mingw\bin\gcc.exe
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c build\src.win32-2.6\fortranobject.c -o build\temp.win32-2.6\Release\build\src.win32-2.6\fortranobject.o
compiling Fortran 90 module sources
XXX: module_build_dir='build\\temp.win32-2.6\\Release\\scikits\\bvp_solver' option ignored
XXX: Fix module_dir_switch for  GnuFCompiler
XXX: module_dirs=[] option ignored
XXX: Fix module_include_switch for  GnuFCompiler
Fortran f77 compiler: C:\mingw\bin\g77.exe -g -Wall -fno-second-underscore -mno-cygwin -O3 -funroll-loops
compile options: '-Ibuild\src.win32-2.6 -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -IC:\Python26\PC -c'
error: f90 not supported by GnuFCompiler needed for scikits\bvp_solver\lib\BVP_M.f90

有办法解决这个问题吗?我在Windows 7,python 2.6,numpy 1.4.1.

@H_301_2@

python setup.py config --compiler=mingw32 build --compiler=mingw32 install

这应该与mfortw32版本的gfortran一起使用.我没有可访问的Windows机器,但是当我用gfortran构建其他python模块(例如numpy)时,命令如下:@H_301_2@

@H_301_2@

python setup.py build --fcompiler=gnu95

ETA:我误读了你问题的开头,现在我看到你可以构建但不能测试.你只用“–compiler = mingw32”试过这个吗?

总结

以上是编程之家为你收集整理的python – 如何让setup.py测试使用特定的fortran编译器?全部内容,希望文章能够帮你解决python – 如何让setup.py测试使用特定的fortran编译器?所遇到的程序开发问题。


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶