2012-09-27 114 views
0

我在这里已经上钽库Python安装几个线程。我已经下载用Cython和试图做一个easy_install的,但得到下面的错误:Python的TA-Lib的使用用Cython

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’: 

回答

2

我写了使用用Cython来包装TA-Lib的所有功能TA-Lib python wrapper,并发布了Github上。它的工作原理对我很好,使用numpy的阵列,速度快2-4倍,更“Python的”,并且易于安装(在Mac OS X)比痛饮接口。

看来你没有正确链接底层的TA-Lib C库 - 你安装了吗?在Mac OS X,你可以brew install ta-lib。对于其他安装指南,看看TA-Lib.org