Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: libta_lib.so.0: cannot open shared object file: No such file or directory

Tags:

python

ubuntu

i'm trying to import talib, but I'm getting this error:

ImportError: libta_lib.so.0: cannot open shared object file: No such file or directory

When I start python like this:

LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" python

import talib works.

How can I turn this solution into a fixed one?

like image 579
Filipe Ferminiano Avatar asked Jul 31 '17 01:07

Filipe Ferminiano


1 Answers

I had the same issue. See below for what I did to fix it.

installing

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/
./configure --prefix=/usr
make
Sudo make install
pip install numpy

If you don't have it installed

pip install TA-Lib 

if you do have it installed

pip install --upgrade --force-reinstall TA-Lib

hope this helps someone :)

like image 176
Chris Evans Avatar answered Sep 22 '22 21:09

Chris Evans