Install RQAlpha and TA-Lib for Jupyter Notebok

Install RQAlpha

Installing the package

# Installing
pip install -U pip setuptools cython
pip install bcolz
pip install rqalpha

# Check the version
rqalpha version

Update the history price

rqalpha update_bundle

Install TA-Lib

Install the source file first

If there is not TA-Lib on the server, there will be error when directly install from pip. Just like this:

talib/common.c:242:10: fatal error: 'ta-lib/ta_defs.h' file not found
    #include "ta-lib/ta_defs.h"
             ^
    1 error generated.
    error: command 'gcc' failed with exit status 1

The solution is to install the source file in the Linux first, and then use the pip to install it to python environment.

# Download the source file and unzip it
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib

# Install the source file
./configure --prefix=/usr
make
make install

Install the python package via pip

pip install ta-lib

In python, simply import the package:

import talib