2019-03-19 02:45:48 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-03-19 05:00:47 +00:00
|
|
|
|
2019-04-14 15:10:26 +00:00
|
|
|
python=$1
|
2019-05-15 08:43:10 +00:00
|
|
|
prefix=$2
|
2019-08-07 15:30:38 +00:00
|
|
|
shift 2
|
2019-04-14 15:10:26 +00:00
|
|
|
|
|
|
|
[[ -z $python ]] && python=python
|
2019-04-15 06:08:08 +00:00
|
|
|
[[ -z $prefix ]] && prefix=/usr
|
2019-04-14 15:10:26 +00:00
|
|
|
|
2019-05-15 08:36:56 +00:00
|
|
|
$python -m pip install --upgrade pip setuptools wheel
|
|
|
|
|
2019-03-19 05:00:47 +00:00
|
|
|
# Get and build ta-lib
|
2019-08-07 15:30:38 +00:00
|
|
|
function install-ta-lib()
|
|
|
|
{
|
|
|
|
pushd /tmp
|
|
|
|
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
|
|
|
|
tar -xf ta-lib-0.4.0-src.tar.gz
|
|
|
|
cd ta-lib
|
|
|
|
./configure --prefix=$prefix
|
|
|
|
make -j
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
}
|
2020-03-24 05:27:04 +00:00
|
|
|
|
2019-08-07 15:30:38 +00:00
|
|
|
function ta-lib-exists()
|
|
|
|
{
|
|
|
|
ta-lib-config --libs > /dev/null
|
|
|
|
}
|
|
|
|
ta-lib-exists || install-ta-lib
|
2019-03-19 05:00:47 +00:00
|
|
|
|
|
|
|
# old versions of ta-lib imports numpy in setup.py
|
2019-05-15 08:36:56 +00:00
|
|
|
$python -m pip install numpy
|
2019-03-19 05:00:47 +00:00
|
|
|
|
2019-04-03 04:46:30 +00:00
|
|
|
# Install extra packages
|
2019-05-15 08:36:56 +00:00
|
|
|
$python -m pip install --pre --extra-index-url https://rquser:ricequant99@py.ricequant.com/simple/ rqdatac
|
|
|
|
$python -m pip install ta-lib
|
|
|
|
$python -m pip install https://vnpy-pip.oss-cn-shanghai.aliyuncs.com/colletion/ibapi-9.75.1-py3-none-any.whl
|
2019-04-03 04:46:30 +00:00
|
|
|
|
2019-03-19 02:45:48 +00:00
|
|
|
# Install Python Modules
|
2019-05-15 08:36:56 +00:00
|
|
|
$python -m pip install -r requirements.txt
|
2019-02-26 02:31:23 +00:00
|
|
|
|
2019-04-01 01:25:23 +00:00
|
|
|
# Install local Chinese language environment
|
2019-08-07 15:30:38 +00:00
|
|
|
locale-gen zh_CN.GB18030
|
2019-04-01 01:25:23 +00:00
|
|
|
|
2019-03-19 02:45:48 +00:00
|
|
|
# Install vn.py
|
2020-01-10 07:20:49 +00:00
|
|
|
# $python -m pip install . $@
|