原文地址: TA-LIB document
翻譯地址:https://github.com/HuaRongSAO/talib-document
安裝
使用pip安裝 PyPI:
$ pip install TA-Lib
Or checkout the sources and run setup.py
yourself:
$ python setup.py install
如果安裝發(fā)生錯(cuò)誤
func.c:256:28: fatal error: ta-lib/ta_libc.h: No such file or directory
compilation terminated.
如果你遇到這樣的編譯錯(cuò)誤聚唐,它通常意味著它找不到底層的庫,需要安裝:
Dependencies 依賴庫文件
使用Python的TA庫,你需要有安裝底層庫文件:下載TA-Lib底層庫文件
安裝底層庫文件方法
Mac OS X
$ brew install ta-lib
Windows
Download ta-lib-0.4.0-msvc.zip
and unzip to C:\ta-lib
Linux
Download ta-lib-0.4.0-src.tar.gz and:
$ untar and cd
$ ./configure --prefix=/usr
$ make
$ sudo make install
If you build
TA-Lib
usingmake -jX
it will fail but that's OK!
Simply rerunmake -jX
followed by[sudo] make install
.