How to debug Cython code in Pandas?

Viewed 1007

I have downloaded Pandas source and now trying to debug it. I modified Makefile:

sparse: pandas/src/sparse.pyx
python-dbg setup.py build_ext --inplace --pyrex-gdb

build: clean_pyc
python-dbg setup.py build_ext --inplace --pyrex-gdb

develop: build
-python-dbg setup.py develop --pyrex-gdb

Also I have a very simple script:

from numpy import asarray
from pandas import algos

v = [4171.0, 0.0]
expAverage = algos.ewma(asarray(v), 50, 1)

print expAverage

When I try to run it with python-dbg test1.py, this is what I get:

/tmp/1/pandas/pandas/hashtable.so: undefined symbol: Py_InitModule4_64
Traceback (most recent call last):
  File "test1.py", line 2, in <module>
    from pandas import algos
  File "/tmp/1/pandas/pandas/__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
ImportError: /tmp/1/pandas/pandas/hashtable.so: undefined symbol: Py_InitModule4_64
[94423 refs]

What is wrong?

1 Answers
Related