命令'gcc'失败,退出状态为1

时间:2014-02-05 00:34:53

标签: 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 -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

2 个答案:

答案 0 :(得分:0)

根据error: cannot find -lmsvcr100 msvcr100.dll,您需要先安装Microsoft Visual C ++ 2010 Redistributable Package,然后将C:\Python33\libs复制到-lpython目录,以便链接为C :\ Python44 \ libs因为-lmsvcr100和{{1}}在编译期间都指向同一个位置,因此它们必须位于同一目录中。当我需要安装Cython时,此解决方案适用于我。

答案 1 :(得分:-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

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