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