Python TA-Lib using cython



我在Ta-Lib python安装上有几个线程。我已经下载了Cython并尝试进行easy_install但收到以下错误:

talib.c:256:28: error: ta-lib/ta_libc.h: No such file or directory
talib.c: In function ‘__pyx_pf_5talib_ACOS’:
talib.c:2391: warning: assignment from incompatible pointer type
talib.c:2502: warning: implicit declaration of function ‘TA_Initialize’
talib.c:2511: warning: implicit declaration of function ‘TA_ACOS_Lookback’
talib.c:2569: warning: implicit declaration of function ‘TA_ACOS’
talib.c:2578: warning: implicit declaration of function ‘TA_Shutdown’
talib.c:2587: error: ‘TA_SUCCESS’ undeclared (first use in this function)
talib.c:2587: error: (Each undeclared identifier is reported only once
talib.c:2587: error: for each function it appears in.)
talib.c: In function ‘__pyx_pf_5talib_2AD’:

我编写了 TA-Lib python 包装器,它使用 Cython 将所有函数包装在 TA-Lib 中,并在 Github 上发布。 它对我来说效果非常好,使用 Numpy 数组,比 SWIG 界面快 2-4 倍,更"pythonic",并且更容易安装(适用于 Mac OS X)。

您似乎没有正确链接到底层 TA-Lib C 库 - 您是否安装了它? 在 Mac OS X 上,您可以brew install ta-lib . 有关其他安装指南,请查看 TA-Lib.org

最新更新