2011-06-29 6 views
4

私はいくつかのf90ファイルを含むpackageをテストしようとしています。 Fortranコンパイラをビルドまたはインストールして指定するとうまく動作します。しかし、テストしようとすると、次のエラーが表示されます。特定のFortranコンパイラを使用するためにsetup.pyテストを取得するにはどうすればよいですか?

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です。

+0

あなたは私たちですか? gfortranまたはg95?また、F90コンパイラはどこにインストールされていますか? –

+0

私はgfortranを使用していますが、g95をインストールできます。 gfortranはC:\ MinGW \ binにインストールされています –

+0

gfortranを使うことをお勧めします。私はちょうどあなたが実際にgfortranを使っていることを確認したかったのです。人々はしばしばg95とgfortranを混乱させます。 –

答えて

1

「テスト」コマンドがインプレースを構築する必要があるという問題があると思います。

python setup.py config --fcompiler=gfortran build_ext --inplace 

は前と同じエラーが発生しましたが、

python setup.py config --fcompiler=gfortran build_ext 

ではありませんでした。

私はインプレースを選択

  • をのgfortranするFortranコンパイラを設定するインタラクティブ モード(のpython setup.py)

  • でセットアップを実行

    1. によって問題を回避することができましたビルド(3)

  • 2

    次のようにそのパッケージのdocumentationが建物をお勧めします。

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

    をのgfortranのMINGW32のバージョンで動作するはずだと。私は、Windowsマシンにアクセスがありませんが、私はのgfortranと(例えばnumpyの、)他のPythonモジュールを構築した際に、コマンドのようなものだった:

    python setup.py build --fcompiler=gnu95 
    

    ETA:私はあなたの質問の始まりを読み違えます今、私はあなたが構築することができますが、テストしていないことがわかります。あなたは "--compiler = mingw32"だけでこれを試しましたか?

    +0

    残念ながら働かなかった。興味深いことに、Pythonのsetup.py config --fcompiler = gfortran build_ext --inplaceは動作しませんでしたが、python setup.py config --fcompiler = gfortran build_extは、これは私が 'testインプレースを構築する必要があります。 –

    +0

    python setup.py build --fcompiler = gnu95は、ubuntu 11.10にscipyをインストールするために完全に動作します。私は一日中検索していましたが、これが私の解決策でした。 – Louis

    関連する問題