Python 命令“gcc”失败,退出状态为1

Python 命令“gcc”失败,退出状态为1,python,gcc,mingw,Python,Gcc,Mingw,我尝试了所有的答案,但我无法解决安装Biopython软件包的问题 我安装了Mingw,但是当我尝试安装包时:python setup.py install 我得到以下错误: running install running build running build_py running build_ext building 'Bio.cpairwise2' extension c:\mingw\bin\gcc.exe -mno-cygwin -mdl

我尝试了所有的答案,但我无法解决安装Biopython软件包的问题 我安装了Mingw,但是当我尝试安装包时:python setup.py install 我得到以下错误:

    running install
    running build
    running build_py
    running build_ext
    building 'Bio.cpairwise2' extension
    c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\Python33\include -Ic:\Pytho
    n33\include -c Bio/cpairwise2module.c -o build\temp.win-amd64-3.3\Release\bio\cp
    airwise2module.o
    writing build\temp.win-amd64-3.3\Release\bio\cpairwise2.def
    c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win-amd64-3.3\Release\bio
    \cpairwise2module.o build\temp.win-amd64-3.3\Release\bio\cpairwise2.def -Lc:\Pyt
    hon33\libs -Lc:\Python33\PCbuild\amd64 -lpython33 -lmsvcr100 -o build\lib.win-am
    d64-3.3\Bio\cpairwise2.pyd
    c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: c:\Python3
    3\libs/python33.lib(python33.dll): Recognised but unhandled machine type (0x8664
    ) in Import Library Format archive
    c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: cannot fin
    d -lmsvcr100
    collect2: ld returned 1 exit status

error: command 'gcc' failed with exit status 1

您将得到两个错误。第一个是你的:

error: cannot find -lmsvcr100
error: command 'gcc' failed with exit status 1
在解决第一个错误后,您将得到第二个错误:

error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1

它们是两种不同的错误,有两种不同的解决方案。你可以找到更多。

< P>根据错误:找不到-LMVCR100需要首先安装微软Visual C++ 2010可重分发包;第二,复制MsCR100.DLL到C:\Python 33 LIBS。链接的目录是C:\Python 44 LIBS,因为编译期间,LPython和-LMVCR100都指向相同的位置,所以它们必须在同一个目录中。当我需要安装Cython时,这个解决方案对我有效

你可能错过了微软C++库:另一方面,我不知道你是否可以用MinGW编译Python扩展。官方文档建议将MSVisualStudio2010用于Python 3.3。