gpt4 book ai didi

python - 安装Python库时出错?

转载 作者:行者123 更新时间:2023-12-02 10:55:41 25 4
gpt4 key购买 nike

我正在尝试使用ahocorasick安装easy_install库,但出现此错误:

Searching for ahocorasick
Reading http://pypi.python.org/simple/ahocorasick/
Reading http://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/
Best match: ahocorasick 1.0pre
Downloading https://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/ahocorasick-1.0pre.tar.gz
Processing ahocorasick-1.0pre.tar.gz
Running ahocorasick-1.0pre\setup.py -q bdist_egg --dist-dir c:\users\t-rahulp\appdata\local\temp\easy_install-dmwagb\ahocorasick-1.0pre\egg-dist-tmp-c
gqixx
aho-corasick.c: In function 'aho_corasick_goto_initialize':
aho-corasick.c:171:1: warning: control reaches end of non-void function
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0x2d): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0x5c): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0xaa): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0xcb): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0xd4): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0x116): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0x321): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0x331): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\aho-corasick.o:aho-corasick.c:(.text+0x579): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\slist.o:slist.c:(.text+0x13): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\slist.o:slist.c:(.text+0x61): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\slist.o:slist.c:(.text+0xb0): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\slist.o:slist.c:(.text+0x106): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\slist.o:slist.c:(.text+0x11c): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0xaa): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0xd0): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0xe5): undefined reference to `_imp__Py_BuildValue'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x106): undefined reference to `_imp__Py_BuildValue'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x121): undefined reference to `_imp__PyList_New'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x15e): undefined reference to `_imp__Py_BuildValue'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x192): undefined reference to `_imp__PyList_Append'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x237): undefined reference to `_imp__PyArg_ParseTupleAndKeywords'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x252): undefined reference to `_imp__PyExc_AssertionError'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x25d): undefined reference to `_imp__PyErr_SetString'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x27f): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x2c4): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x308): undefined reference to `_imp__PyArg_ParseTupleAndKeywords'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x324): undefined reference to `_imp__PyExc_AssertionError'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x32f): undefined reference to `_imp__PyErr_SetString'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x34c): undefined reference to `_imp__PyExc_AssertionError'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x357): undefined reference to `_imp__PyErr_SetString'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x3d1): undefined reference to `_imp__Py_BuildValue'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x3da): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x450): undefined reference to `_imp__PyExc_AssertionError'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x45b): undefined reference to `_imp__PyErr_SetString'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x479): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x4bc): undefined reference to `_imp__PyArg_ParseTupleAndKeywords'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x4d8): undefined reference to `_imp__PyExc_AssertionError'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x4e3): undefined reference to `_imp__PyErr_SetString'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x4fd): undefined reference to `_imp__PyExc_AssertionError'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x508): undefined reference to `_imp__PyErr_SetString'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x537): undefined reference to `_imp__PyExc_MemoryError'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x542): undefined reference to `_imp__PyErr_SetString'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x551): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x58f): undefined reference to `_imp__PyMem_Malloc'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x61b): undefined reference to `_imp__PyMem_Free'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x640): undefined reference to `_imp__PyType_Ready'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x649): undefined reference to `_imp__PyType_GenericNew'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x65b): undefined reference to `_imp__PyType_Ready'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x68c): undefined reference to `_imp__Py_InitModule4'
build\temp.win-amd64-2.6\Release\py_wrapper.o:py_wrapper.c:(.text+0x6b5): undefined reference to `_imp__PyModule_AddObject'
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1

我尝试手动执行此操作,但最终出现相同的错误。我将MinGW添加到了PATH中,因此找到 gcc应该不是问题。关于如何解决这个问题的任何建议?

最佳答案

查找ahocorasick的构建依赖项并安装它们。您可能会缺少 header 和开发库,没有它们就无法构建程序。

关于python - 安装Python库时出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8027065/

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