Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ImportError:没有名为Cython.Debugger的模块?_Python_Cython - Fatal编程技术网

Python ImportError:没有名为Cython.Debugger的模块?

Python 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

我在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 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