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

ioekq8ef  于 2022-11-13  发布在  其他
关注(0)|答案(2)|浏览(215)

我尝试了所有的答案,但我不能解决安装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
nkcskrwz

nkcskrwz1#

根据here for error: cannot find -lmsvcr100,您需要首先安装Microsoft Visual C++ 2010 Redistributable Package,然后将msvcr100.dll复制到C:\Python33\libs,链接的目录是C:\Python44\libs,因为-lpython-lmsvcr100在编译过程中指向相同的位置,因此它们必须位于相同的目录中。

x3naxklr

x3naxklr2#

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

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

相关问题