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?
python-dbg
can use.This explanation has the details:
http://hustoknow.blogspot.co.uk/2013/06/why-your-python-program-cant-start-when.html
To me it seems like --with-pydebug
flag is not equivalent / triggers the same actions as --pyrex-gdb
. BTW, it seems that --pyrex-gdb
has been renamed to --cython-gdb
.
cygdb
or cython --gdb
instead? It seems like the flag that you're using has been reported not to work: https://groups.google.com/forum/#!topic/cython-users/K6sjhzUX5JA If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With