我正在尝试测试包含一些f90文件的package.如果我构建或安装并指定fortran编译器,它可以正常工作.但是,当我尝试测试时,我收到以下错误:
C:Usersjsalvatierworkspacescikits.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 'buildsrc.win32-2.6fortranobject.c' to sources.
adding 'buildsrc.win32-2.6' to include_dirs.
adding 'buildsrc.win32-2.6scikitsbvp_solverlibbvp_solverf-f2pywrappers2.f90' to sources.
building data_files sources
build_src: building npy-pkg config files
writing scikits.bvp_solver.egg-infoPKG-INFO
writing namespace_packages to scikits.bvp_solver.egg-infonamespace_packages.txt
writing top-level names to scikits.bvp_solver.egg-infotop_level.txt
writing dependency_links to scikits.bvp_solver.egg-infodependency_links.txt
reading manifest file 'scikits.bvp_solver.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'scikits.bvp_solver.egg-infoSOURCES.txt'
running build_ext
customize Mingw32CCompiler
customize Mingw32CCompiler using build_ext
customize GnuFCompiler
Found executable C:mingwbing77.exe
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
Found executable C:mingwbing77.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: '-Ibuildsrc.win32-2.6 -IC:Python26libsite-packagesnumpycoreinclude -IC:Python26include -IC:Python26PC -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuildsrc.win32-2.6 -IC:Python26libsite-packagesnumpycoreinclude -IC:Python26include -IC:Python26PC -c buildsrc.win32-2.6scikitsbvp_solverlibbvp_solverfmodule.c -o buildtemp.win32-2.6Releasebuildsrc.win32-2.6scikitsbvp_solverlibbvp_solverfmodule.o
Found executable C:mingwbingcc.exe
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuildsrc.win32-2.6 -IC:Python26libsite-packagesnumpycoreinclude -IC:Python26include -IC:Python26PC -c buildsrc.win32-2.6fortranobject.c -o buildtemp.win32-2.6Releasebuildsrc.win32-2.6fortranobject.o
compiling Fortran 90 module sources
XXX: module_build_dir='buildtemp.win32-2.6Releasescikitsbvp_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:mingwbing77.exe -g -Wall -fno-second-underscore -mno-cygwin -O3 -funroll-loops
compile options: '-Ibuildsrc.win32-2.6 -IC:Python26libsite-packagesnumpycoreinclude -IC:Python26include -IC:Python26PC -c'
error: f90 not supported by GnuFCompiler needed for scikitsbvp_solverlibBVP_M.f90
有办法解决这个问题吗?我在Windows 7,python 2.6,numpy 1.4.1.
该软件包的documentation建议如下构建:
python setup.py config --compiler=mingw32 build --compiler=mingw32 install
这应该与mfortw32版本的gfortran一起使用.我没有可访问的Windows机器,但是当我用gfortran构建其他Python模块(例如numpy)时,命令如下:
python setup.py build --fcompiler=gnu95
ETA:我误读了你问题的开头,现在我看到你可以构建但不能测试.你只用“–compiler = mingw32”试过这个吗?