ta-lib依赖安装问题

TA-Lib 是用于股票技术分析,包括 MACD, RSI, Stochastic, Bollinger Bands等技术指标的第三方库。

使用pip install 进行安装,无法安装报错:

talib/common.c:8:22: fatal error: pyconfig.h: No such file or directory
 #include "pyconfig.h"
                      ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1  

根据github上的官方说明:是在64位的python上无法安装‘32-bit binary distribution of the underlying TA-Lib library‘,

对应不同的系统需要安装依赖:

  详细的步骤可以对应官网说明:Dependencies

mac os是最简单的,直接:brew install ta-lib,

总结:安装第三方库,首先把官方文档阅读一遍,许多安装问题其实其他人也遇到过,避免重复劳动才是程序员存在的意义。

 

猜你喜欢

转载自www.cnblogs.com/ForPython/p/9277717.html