を使用して Fortran コードから Python モジュールを作成しようとしていますf2py。プロジェクトの Makefile をセットアップしました。Windows 7 で MinGW と Python 3.2.2 を使用しています。
f2py.py -c --compiler=mingw32 -m itf itimes-f.f
すべてが正常にコンパイルされ、実行されます。ただし、Makefile でターゲットを作成して実行すると、次のようになります。
> make compilef
f2py.py -c --compiler=mingw32 -m itf itimes-f.f
process_begin: CreateProcess(NULL, env python.exe C:\Python32\Scripts\f2py.py -c
--compiler=mingw32 -m itf itimes-f.f, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [compilef] Error 2
コマンドが実行されないのはなぜmakeですか?どうすれば修正できますか?
編集:出力に示されているコマンドを実行しても機能しません:
> env python.exe C:\Python32\Scripts\f2py.py -c --compiler=mingw32 -m itf itimes-f.f
'env' is not recognized as an internal or external command,
operable program or batch file.
ただし、以下は機能します。
> python.exe C:\Python32\Scripts\f2py.py -c --compiler=mingw32 -m itf itimes-f.f
EDIT 2:これは別の質問を提起します-それは何でenvあり、なぜmakeそれを追加するのですか?
EDIT 3: Florian のコメントに基づいて、f2py.py にシバン行が存在するために、envによって追加されたようです。makeシバンの前に追加を追加して、f2py.pyを編集しまし#た。私は今、次の問題を抱えています:
>make compilef
f2py.py -c --compiler=mingw32 -m itf itimes-f.f
process_begin: CreateProcess(C:\Python32\Scripts\f2py.py, f2py.py -c --compiler=
mingw32 -m itf itimes-f.f, ...) failed.
make (e=193): Error 193
make: *** [compilef] Error 193