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

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

    running install
    running build
    running build_py
    running build_ext
    building 'Bio.cpairwise2' extension
    c:mingwbingcc.exe -mno-cygwin -mdll -O -Wall -Ic:Python33include -Ic:Pytho
    n33include -c Bio/cpairwise2module.c -o buildtemp.win-amd64-3.3Releasebiocp
    airwise2module.o
    writing buildtemp.win-amd64-3.3Releasebiocpairwise2.def
    c:mingwbingcc.exe -mno-cygwin -shared -s buildtemp.win-amd64-3.3Releasebio
    cpairwise2module.o buildtemp.win-amd64-3.3Releasebiocpairwise2.def -Lc:Pyt
    hon33libs -Lc:Python33PCbuildamd64 -lpython33 -lmsvcr100 -o buildlib.win-am
    d64-3.3Biocpairwise2.pyd
    c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: c:Python3
    3libs/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
stack overflow command 'gcc' failed with exit status 1
原文答案

答案:

作者头像

根据 here for error: cannot find -lmsvcr100 ,您需要首先安装 Microsoft Visual C++ 2010 Redistributable Package,其次,将 msvcr100.dll 复制到 C:Python33libs 用于链接的目录是 C:Python44libs,因为 {JXM= } 和 -lpython 在编译期间指向同一个位置,因此它们必须位于同一个目录中。` 当我需要安装 Cython 时,此解决方案对我有用。

作者头像

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

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

相关问题