Python 2.7 gfortran.exe抱怨'-mno cygwin';使用f2py的选项

Python 2.7 gfortran.exe抱怨'-mno cygwin';使用f2py的选项,python-2.7,gfortran,f2py,Python 2.7,Gfortran,F2py,当使用f2py编译Fortran代码时,gfortran.exe会抱怨'-mno cygwin'选项 我已经用gcc编译器检查了一个类似问题的所有答案,并且从cygwincompiler.py中删除了-mno-Cygwin选项(它只存在一次)。我使用的是python(x,y)2.7.10版 f2py-c-m ex2lib ex2lib.f90--fcompiler=gnu95--compiler=mingw32 您最近安装了mingw吗?2018年11月,这有帮助吗?它提供存储选项的文件路径。您

当使用f2py编译Fortran代码时,gfortran.exe会抱怨'-mno cygwin'选项

我已经用gcc编译器检查了一个类似问题的所有答案,并且从cygwincompiler.py中删除了-mno-Cygwin选项(它只存在一次)。我使用的是python(x,y)2.7.10版

f2py-c-m ex2lib ex2lib.f90--fcompiler=gnu95--compiler=mingw32


您最近安装了mingw吗?2018年11月,这有帮助吗?它提供存储选项的文件路径。您最近安装了mingw吗?2018年11月,这有帮助吗?它提供存储选项的文件路径。
Reading fortran codes...
        Reading file 'ex2lib.f90' (format:free)
Post-processing...
        Block: ex2lib
                        Block: calcenergy
                        Block: calcforces
                        Block: calcenergyforces
Post-processing (stage 2)...
Building modules...
        Building module "ex2lib"...
                Constructing wrapper function "calcenergy"...
                  penergy = calcenergy(pos,[dim,natom])
                Constructing wrapper function "calcforces"...
                  forces = calcforces(pos,[dim,natom])
                Constructing wrapper function "calcenergyforces"...
                  penergy,forces = calcenergyforces(pos,[dim,natom])
        Wrote C/API module "ex2lib" to file "c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.c"
  adding 'c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.c' to sources.
  adding 'c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7' to include_dirs.
copying C:\Python27\lib\site-packages\numpy\f2py\src\fortranobject.c -> c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7
copying C:\Python27\lib\site-packages\numpy\f2py\src\fortranobject.h -> c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7
build_src: building npy-pkg config files
running build_ext
Cannot build msvcr library: "msvcr90d.dll" not found
customize Mingw32CCompiler
customize Mingw32CCompiler using build_ext
customize Gnu95FCompiler
Found executable C:\MinGW\bin\gfortran.exe
Found executable C:\MinGW\bin\gfortran.exe
customize Gnu95FCompiler using build_ext
building 'ex2lib' extension
compiling C sources
C compiler: gcc -O2 -Wall -Wstrict-prototypes

creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh
creating c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7
compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c'
gcc -O2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.c -o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.o
Found executable C:\MinGW\bin\gcc.exe
gcc -O2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c c:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.c -o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.o
compiling Fortran sources
Fortran f77 compiler: C:\MinGW\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -O2 -funroll-loops
Fortran f90 compiler: C:\MinGW\bin\gfortran.exe -Wall -g -fno-second-underscore -O2 -funroll-loops
Fortran fix compiler: C:\MinGW\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -O2 -funroll-loops
compile options: '-Ic:\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c'
gfortran.exe:f90: ex2lib.f90
C:\MinGW\bin\gfortran.exe -Wall -g -mno-cygwin -Wall -g -mno-cygwin -shared c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\ex2lib.o -Lc:\mingw\lib\gcc\mingw32\6.3.0 -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lgfortran -o .\ex2lib.pyd
gfortran.exe: error: unrecognized command line option '-mno-cygwin'; did you mean '-mno-clwb'?
gfortran.exe: error: unrecognized command line option '-mno-cygwin'; did you mean '-mno-clwb'?
error: Command "C:\MinGW\bin\gfortran.exe -Wall -g -mno-cygwin -Wall -g -mno-cygwin -shared c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\ex2libmodule.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\users\roman\appdata\local\temp\tmp5wnlgh\src.win32-2.7\fortranobject.o c:\users\roman\appdata\local\temp\tmp5wnlgh\Release\ex2lib.o -Lc:\mingw\lib\gcc\mingw32\6.3.0 -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lgfortran -o .\ex2lib.pyd" failed with exit status 1```