[转]TA-Lib 安装

Posted XY

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[转]TA-Lib 安装相关的知识,希望对你有一定的参考价值。

转自:https://mrjbq7.github.io/ta-lib/install.html 

 

Installation

You can install from PyPI:

$ pip install TA-Lib

Or checkout the sources and run setup.py yourself:

$ python setup.py install

Troubleshooting Install Errors

func.c:256:28: fatal error: ta-lib/ta_libc.h: No such file or directory
compilation terminated.

If you get build errors like this, it typically means that it can‘t find the underlying TA-Lib library and needs to be installed:

Dependencies

To use TA-Lib for python, you need to have the TA-Lib already installed:

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 using make -jX it will fail but that‘s OK! Simply rerun make -jX followed by [sudo] make install.

Documentation Index

以上是关于[转]TA-Lib 安装的主要内容,如果未能解决你的问题,请参考以下文章

ta-lib依赖安装问题

TA-lib 库未安装在 pydroid 3 中?

量化指标程序库 ta-lib 安装方法

无法安装TA-LIB?

安装Ta-lib会导致gcc错误

ta-lib安装问题