Python ImportError:没有名为Cython.Debugger的模块?
我在windows10上调试cython代码时遇到了这个错误。这里是细节。有人能帮我吗 1.pyxPython ImportError:没有名为Cython.Debugger的模块?,python,cython,Python,Cython,我在windows10上调试cython代码时遇到了这个错误。这里是细节。有人能帮我吗 1.pyx cdef int _resemble(str s1, str s2): cdef int count = 0 cdef int len_s1 = len(s1) cdef int len_s2 = len(s2) cdef float bound = 0.5*(max(len_s1, len_s2)) cdef int index1, index2
cdef int _resemble(str s1, str s2):
cdef int count = 0
cdef int len_s1 = len(s1)
cdef int len_s2 = len(s2)
cdef float bound = 0.5*(max(len_s1, len_s2))
cdef int index1, index2
cdef str item1, item2
for index1 in range(len_s1):
item1 = s1[index1]
for index2 in range(len_s2):
item2 = s2[index2]
if item1 == item2 and abs(index2 - index1) < bound:
count += 1
return count
def resemble(s1, s2):
return _resemble(s1, s2)
test.py
import resemble
r = resemble.resemble("dfefgeg,fre", "wff.fefre")
print(r)
指令
错误:
Traceback (most recent call last):
File "<string>", line 11, in <module>
ImportError: No module named Cython.Debugger
回溯(最近一次呼叫最后一次):
文件“”,第11行,在
ImportError:没有名为Cython.Debugger的模块
您的gdb是用python 2.x还是3.x编译的?它必须用2.x构建,cygdb才能工作。请参阅和。这是否回答了您的问题?您的gdb是用python 2.x还是3.x编译的?它必须用2.x构建,cygdb才能工作。请参阅和。这是否回答了您的问题?
cython --gdb resemble.pyx
python setup.py build_ext --inplace
cygdb
Traceback (most recent call last):
File "<string>", line 11, in <module>
ImportError: No module named Cython.Debugger