奇葩问题
问题一:gcc 编译器未安装
问题二:
command 'gcc' failed with exit status 1
问题三:
Traceback (most recent call last):
File "run1.py", line 3, in <module>
from vnpy.trader.engine import MainEngine, LogEngine
File "/home/fireaiserver/VNPY/vnpy/trader/engine.py", line 32, in <module>
from .setting import SETTINGS
File "/home/fireaiserver/VNPY/vnpy/trader/setting.py", line 7, in <module>
from .utility import load_json
File "/home/fireaiserver/VNPY/vnpy/trader/utility.py", line 10, in <module>
import talib
File "/home/fireaiserver/anaconda3/envs/vnpy/lib/python3.6/site-packages/talib/__init__.py", line 43, in <module>
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 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
pip install TA-Lib
问题三: 配置 /usr/local/lib
sudo echo "/usr/local/lib" >> /etc/ld.so.conf
sudo ldconfig
来源:CSDN
作者:非黑 | 即白
链接:https://blog.csdn.net/weixin_43832593/article/details/104021882