Installing TA-LIB (Ubuntu)

I am assuming that you have already installed Miniconda on your machine and configured the right environment. For me, my environment has always been py3k so I will have to activate it first by doing

source activate py3k

Now let’s install TA-LIB first.

sudo wget

tar -xzf ta-lib-0.4.0-src.tar.gz or sudo tar -xzf ta-lib-0.4.0-src.tar.gz

cd ta-lib/

sudo ./configure (if gcc is missing, install it by doing “apt-get install build-essential”)

sudo make

sudo make install

Now let’s install TA-LIB python wrapper

Install wrapper

Pip install

At this point, it seems that everything is done.  You can try logging into your python environment (with the right environment) and try to import talib by typing

import talib

and see if it throws an error. If you get an error like below:

Traceback (most recent call last):   File “”, line 1, in ImportError: cannot open shared object file: No such file or directory

You will need to do the additional steps below.

do either

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

or for a permanent solution, have to add /usr/local/lib to /etc/ as root then run /sbin/ldconfig (also as root)


Author: Zac

Think & Do

One thought on “Installing TA-LIB (Ubuntu)”

  1. It is really helpful. Thanks very much!
    I don’t know why python wrapper is required. I assumed after the step of typing “make install” it should work. But it turns out to be not correctly installing ta-lib


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s