centos安装 TA-Lib

centos安装 TA-Lib,第1张

centos安装 TA-Lib

奇葩问题
问题一:gcc 编译器未安装
问题二:

command 'gcc' failed with exit status 1


问题三:

Traceback (most recent call last):
  File "run1.py", line 3, in 
    from vnpy.trader.engine import MainEngine, LogEngine
  File "/home/fireaiserver/VNPY/vnpy/trader/engine.py", line 32, in 
    from .setting import SETTINGS
  File "/home/fireaiserver/VNPY/vnpy/trader/setting.py", line 7, in 
    from .utility import load_json
  File "/home/fireaiserver/VNPY/vnpy/trader/utility.py", line 10, in 
    import talib
  File "/home/fireaiserver/anaconda3/envs/vnpy/lib/python3.6/site-packages/talib/__init__.py", line 43, in 
    from ._ta_lib import (
importError: libta_lib.so.0: cannot open shared object file: No such file or directory


解决方案
问题一:

yum -y install gcc gcc-c++ kernel-devel //安装gcc、c++编译器以及内核文件 


问题二:

下载 ta_lib 依赖包

wget --no-check-certificate https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz


解压并编译安装

tar -xvf ta-lib-0.4.0-src.tar.gz
cd ta-lib
./configure 
sudo make 
sudo make install 


安装 TA-Lib

问题三: 配置 /usr/local/lib

sudo echo "/usr/local/lib" >> /etc/ld.so.conf 
sudo ldconfig
 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4000913.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-10-22
下一篇 2022-10-22

发表评论

登录后才能评论

评论列表(0条)

保存