gpt4 book ai didi

python - 无法在 Windows 10 collect2.exe 错误上使用 Python27 MingW 安装 leven 包

转载 作者:行者123 更新时间:2023-11-30 05:34:55 27 4
gpt4 key购买 nike

我正在尝试使用 python 2.7.10、windows 10 和 mingw 安装 leven 包 ( https://pypi.python.org/pypi/leven/ )。我收到以下错误:

“collect2.exe:错误:ld 返回了 1 个退出状态”

如有任何帮助,我们将不胜感激。几天来我一直在尝试安装它。我已经克服了几个问题,包括使用此解决方案之前出现的 collect2.exe 错误:Unable to Install pyslalib package using python2.7 / MINGW on Windows 10

但是,在解决该问题后,又出现了另一个错误。这是错误:

 C:\bin\leven-1.0.4.tar\dist\leven-1.0.4>python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to leven.egg-info\requires.txt
writing leven.egg-info\PKG-INFO
writing top-level names to leven.egg-info\top_level.txt
writing dependency_links to leven.egg-info\dependency_links.txt
reading manifest file 'leven.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'leven.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'leven._levenshtein' extension
C:\Program Files (x86)\CodeBlocks\MinGW\bin\gcc.exe -mdll -O -Wall -Ileven -IC:\Python27\include -IC:\Python27\PC -c leven/_levenshtein.cpp -o build\temp.win32-2.7\Release\leven\_levenshtein.o
leven/_levenshtein.cpp: In function 'void __Pyx_RaiseArgtupleInvalid(const char*, int, Py_ssize_t, Py_ssize_t, Py_ssize_t)':
leven/_levenshtein.cpp:1400:59: warning: unknown conversion type character 'z' in format [-Wformat]
leven/_levenshtein.cpp:1400:59: warning: format '%s' expects argument of type 'char*', but argument 5 has type 'Py_ssize_t {aka int}' [-Wformat]
leven/_levenshtein.cpp:1400:59: warning: unknown conversion type character 'z' in format [-Wformat]
leven/_levenshtein.cpp:1400:59: warning: too many arguments for format [-Wformat-extra-args]
writing build\temp.win32-2.7\Release\leven\_levenshtein.def
C:\Program Files (x86)\CodeBlocks\MinGW\bin\g++.exe -mdll -static --entry _DllMain@12 -out-implib=build\temp.win32-2.7\Release\leven\lib_levenshtein.a --def build\temp.win32-2.7\Release\leven\_levenshtein.def -s build\temp.win32-2.7\Release\leven\_levenshtein.o -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o build\lib.win32-2.7\leven\_levenshtein.pyd
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xbe): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xc9): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x114): undefined reference to `_imp__PyErr_Occurred'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x280): undefined reference to `_imp__PyExc_MemoryError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x293): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2b9): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2cc): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2f2): undefined reference to `_imp__PyExc_ValueError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x305): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x32b): undefined reference to `_imp__PyExc_ValueError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x33e): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x364): undefined reference to `_imp__PyExc_IOError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x377): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x39d): undefined reference to `_imp__PyExc_IndexError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x3b0): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x3d6): undefined reference to `_imp__PyExc_OverflowError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x3e9): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x40f): undefined reference to `_imp__PyExc_ArithmeticError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x422): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x448): undefined reference to `_imp__PyExc_ArithmeticError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x45b): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x47e): undefined reference to `_imp__PyExc_RuntimeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x491): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x4b1): undefined reference to `_imp__PyExc_RuntimeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x4c4): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x502): undefined reference to `_imp__PyString_FromString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x515): undefined reference to `_imp__PyImport_Import'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x53e): undefined reference to `_imp__PyString_FromString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x555): undefined reference to `_imp__PyObject_GetAttr'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x5a5): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x5b0): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x5f1): undefined reference to `_imp__PyOS_snprintf'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x60a): undefined reference to `_imp__PyErr_WarnEx'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x62f): undefined reference to `_imp__PyExc_ValueError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x63a): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x6f9): undefined reference to `_imp__PyString_FromString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x728): undefined reference to `_imp__PyString_FromFormat'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x739): undefined reference to `_imp__PyString_FromString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x79f): undefined reference to `_imp__PyCode_New'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x80b): undefined reference to `_imp__PyMem_Malloc'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x89e): undefined reference to `_imp__PyMem_Realloc'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x903): undefined reference to `_imp__PyModule_GetDict'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x91c): undefined reference to `_imp___PyThreadState_Current'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x927): undefined reference to `_imp__PyFrame_New'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x93d): undefined reference to `_imp__PyTraceBack_Here'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x998): undefined reference to `_imp__PyString_FromString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xaa7): undefined reference to `_imp__PyDict_Size'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xaec): undefined reference to `_imp__PyDict_GetItem'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xb23): undefined reference to `_imp__PyDict_GetItem'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xb9b): undefined reference to `_imp__PyDict_GetItem'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xc51): undefined reference to `_imp___PyString_Eq'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xcdc): undefined reference to `_imp___PyString_Eq'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xd40): undefined reference to `_imp__PyUnicodeUCS2_Compare'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xd50): undefined reference to `_imp__PyErr_Occurred'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xde2): undefined reference to `_imp__PyUnicodeUCS2_Compare'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xdf2): undefined reference to `_imp__PyErr_Occurred'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe53): undefined reference to `_imp__PyDict_Next'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe7b): undefined reference to `_imp__PyString_AsString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe94): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe9f): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xeb9): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xecf): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xeef): undefined reference to `_imp__PyString_AsString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xf08): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xf13): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xf8a): undefined reference to `_imp__PyObject_Size'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xfa0): undefined reference to `_imp__PyObject_Size'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xfea): undefined reference to `_imp__PyString_AsStringAndSize'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1012): undefined reference to `_imp__PyErr_Occurred'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1048): undefined reference to `_imp__PyString_AsStringAndSize'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1070): undefined reference to `_imp__PyErr_Occurred'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x14d1): undefined reference to `_imp__PyObject_GetAttr'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x14f8): undefined reference to `_imp__PyTuple_New'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1509): undefined reference to `_imp__PyUnicode_Type'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1549): undefined reference to `_imp__PyObject_Call'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x15b6): undefined reference to `_imp__PyTuple_New'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x15e3): undefined reference to `_imp__PyObject_Call'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x161c): undefined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x163e): undefined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x165c): undefined reference to `_imp__PyTraceBack_Type'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x166e): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1684): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x16ca): undefined reference to `_imp__PyErr_NormalizeException'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x16e6): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x16fc): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1716): undefined reference to `_imp__PyExc_BaseException'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1737): undefined reference to `_imp__PyType_IsSubtype'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1748): undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1753): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x176b): undefined reference to `_imp___PyThreadState_Current'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1911): undefined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x191a): undefined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1927): undefined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1946): undefined reference to `_imp__PyObject_IsTrue'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19a2): undefined reference to `_imp__PyGILState_Ensure'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19b3): undefined reference to `_imp__PyExc_ZeroDivisionError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19be): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19cb): undefined reference to `_imp__PyGILState_Release'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1a1d): undefined reference to `_imp__PyFloat_FromDouble'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1a46): undefined reference to `_imp__PyLong_FromUnsignedLong'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1f1c): undefined reference to `_imp__PyString_Type'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1fbd): undefined reference to `_imp__PyOS_snprintf'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1fc5): undefined reference to `_imp__Py_GetVersion'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x202b): undefined reference to `_imp__PyOS_snprintf'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2044): undefined reference to `_imp__PyErr_WarnEx'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2059): undefined reference to `_imp__PyTuple_New'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x207b): undefined reference to `_imp__PyString_FromStringAndSize'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x20b5): undefined reference to `_imp__Py_InitModule4'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x20cd): undefined reference to `_imp__PyModule_GetDict'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x20e9): undefined reference to `_imp__PyImport_AddModule'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2110): undefined reference to `_imp__PyObject_SetAttrString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2131): undefined reference to `_imp__PyString_FromStringAndSize'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2137): undefined reference to `_imp__PyString_InternFromString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2159): undefined reference to `_imp__PyUnicodeUCS2_DecodeUTF8'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x21b9): undefined reference to `_imp__PyObject_SetAttrString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2203): undefined reference to `_imp__PyObject_GetAttr'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x221f): undefined reference to `_imp__PyExc_NameError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x222a): undefined reference to `_imp__PyErr_Format'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x22f2): undefined reference to `_imp__PyCode_New'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2377): undefined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x239c): undefined reference to `_imp__PyCFunction_NewEx'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x23c1): undefined reference to `_imp__PyDict_SetItem'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x23e1): undefined reference to `_imp__PyDict_New'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2406): undefined reference to `_imp__PyDict_SetItem'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2429): undefined reference to `_imp__PyDict_SetItem'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x24a7): undefined reference to `_imp__PyErr_Occurred'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x24bc): undefined reference to `_imp__PyExc_ImportError'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x24c7): undefined reference to `_imp__PyErr_SetString'
build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2558): undefined reference to `_imp__PyTuple_Pack'
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\Program Files (x86)\\CodeBlocks\\MinGW\\bin\\g++.exe' failed with exit status 1

C:\bin\leven-1.0.4.tar\dist\leven-1.0.4>

提前谢谢你。

最佳答案

这些错误是对 python 核心库(C:\Python27\libs 中的libpython27.a)的引用。确保:

  1. 它存在并且与您的 gcc 架构相匹配。当您使用 32 位 gcc 和 64 位库时,经常会出现这些错误。
  2. 我看到你正在使用 pexports 创建这个库,它也可能工作不正常,参见 http://www.mingw.org/wiki/msvc_and_mingw_dlls - 它可以向所有导出的名称添加额外的 _,您需要按照描述去除它:

pexports python27.dll | sed "s/^_//" > python27.def

  1. 使用 MSVC 2008 构建并链接到 msvcr90.dll 的 Python 标准 Windows 发行版,当 mingw-gcc 将二进制文件与 msvcrt.dll 链接时 - 它会导致很多问题(崩溃)。你需要关注this guide使您的 gcc 链接到 msvcr90.dll

关于python - 无法在 Windows 10 collect2.exe 错误上使用 Python27 MingW 安装 leven 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34043334/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com