Closed Obrepal closed 1 year ago
You need to downgrade your Python version so that the error: no member named 'tp_print' in 'struct _typeobject' becomes a warning instead. Did you ever get this to work? Struggling with the home-brew installation of libfreenect and the Python wrapper myself right now.
The existing freenect.c
is outdated so it's better to generate it locally using one of these methods.
python setup.py build_ext -f
wrappers/python/freenect.c
(as done in 8f5ba392ddcfb62df31c3d5342c0989cbad7233f) and try againcmake -DBUILD_PYTHON3=ON
rather than running setup.py
running install running build running build_ext building 'freenect' extension clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c freenect.c -o build/temp.macosx-11-arm64-3.9/freenect.o -fPIC -I ../../include/ -I /usr/include/libusb-1.0/ -I /usr/local/include/libusb-1.0 -I /usr/local/include -I ../c_sync/ -I /opt/homebrew/lib/python3.9/site-packages/numpy/core/include In file included from freenect.c:353: In file included from /opt/homebrew/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /opt/homebrew/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /opt/homebrew/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969: /opt/homebrew/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
warning "Using deprecated NumPy API, disable it with " \
^ freenect.c:8444:134: warning: code will never be executed [-Wunreachable-code] ...pyx_t_2); Pyx_INCREF(pyx_t_3); pyx_t_2++; if (unlikely(0 < 0)) {pyx_filename = __pyx_f[1]; pyx_lineno = 794; pyx... ^
~~ freenect.c:10210:31: error: no member named 'tp_print' in 'struct _typeobject' pyx_type_8freenect_CtxPtr.tp_print = 0;