2020-01-01 14:34:37 +00:00
|
|
|
|
下载 anaconda 3最新版(必须支持3.7)
|
|
|
|
|
|
|
|
|
|
使用trade用户,安装在 /home/trade/anaconda3
|
|
|
|
|
|
|
|
|
|
创建py37环境
|
|
|
|
|
conda create -name py37=python3.7
|
|
|
|
|
|
|
|
|
|
安装talib
|
|
|
|
|
|
|
|
|
|
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
|
|
|
|
|
tar xvf ta-lib-0.4.0-src.tar.gz
|
2020-03-24 05:27:04 +00:00
|
|
|
|
cd ta-lib
|
|
|
|
|
./configure --prefix=/usr
|
2020-01-01 14:34:37 +00:00
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
下面指令用用root权限运行,会把编译结果放在/usr/local/lib下
|
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
|
|
pip install ta-lib
|
|
|
|
|
|
2020-03-24 05:27:04 +00:00
|
|
|
|
错误:
|
2020-01-01 14:34:37 +00:00
|
|
|
|
ImportError: libta_lib.so.0: cannot open shared object file: No such file or directory
|
|
|
|
|
|
2020-03-24 05:27:04 +00:00
|
|
|
|
解决:
|
|
|
|
|
sudo find / -name libta_lib.so.0
|
|
|
|
|
/home/ai/eco-ta/ta-lib/src/.libs/libta_lib.so.0
|
|
|
|
|
/usr/local/lib/libta_lib.so.0
|
|
|
|
|
vi /etc/profile
|
|
|
|
|
添加
|
|
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
|
|
|
|
source /etc/profile
|
2020-01-01 14:34:37 +00:00
|
|
|
|
|
2020-03-24 05:27:04 +00:00
|
|
|
|
错误:
|
|
|
|
|
autogen.sh:行3: aclocal: 未找到命令
|
|
|
|
|
解决:
|
|
|
|
|
sudo yum -y install automake
|
2020-01-01 14:34:37 +00:00
|
|
|
|
|
2020-03-24 05:27:04 +00:00
|
|
|
|
错误:
|
|
|
|
|
configure.in:13: error: possibly undefined macro: AC_PROG_LIBTOOL
|
|
|
|
|
解决:
|
|
|
|
|
sudo yum install libtool
|
2020-01-01 14:34:37 +00:00
|
|
|
|
|
|
|
|
|
单独编译ctp接口
|
|
|
|
|
|
|
|
|
|
一般直接使用提供的vnctptd.so 和 vnctpmd.so 就可以了。
|
|
|
|
|
如果需要独立编译,按照以下指引:
|
|
|
|
|
【root】安装好gcc环境,
|
|
|
|
|
|