0

so I want to use the legendary TA-Lib on Python.

brew install TA-Lib worked.

But when I try to pipenv install TA-Lib or even pip install TA-Lib I get the following err: command 'clang' failed with exit status 1

Can I use TA-Lib in my code from brew somehow? As it seems I cannot install it otherwise.

Teo
  • 97
  • 1
  • 9

1 Answers1

0

-- EDIT -- Try that way :

First download there :

hyperlink to lib

Then,

tar xf ta-lib-0.4.0-src.tar.gz
cd ta-lib
./configure --prefix=/usr/local
make
sudo make install

'prefix' is really important. Don't miss it.

Last but not least:

pip install TA-Lib
Lumber Jack
  • 602
  • 3
  • 9
  • Damned. Perhaps you have to upgrade some package before. What is written behind Status 1: ? – Lumber Jack Feb 02 '21 at 20:45
  • Now after installing numpy I get ```1 error generated. error: command 'clang' failed with exit status 1``` – Teo Feb 02 '21 at 20:54
  • probably due to an update. I'm afraid you'll have to pip install it from a wheel. It will be then ok – Lumber Jack Feb 02 '21 at 20:54
  • I don't remember exactly where I found it. It was tricky to find. But a question was hoping in my head. I've written pip3 install Ta-Lib, but did you try pip install too? I'll try to find out the whl meanwhule – Lumber Jack Feb 02 '21 at 21:10
  • No, I did not try pip install, my terminal does not even know the pip command. I found the following post to be helpful and am trying the solutions explained there: https://stackoverflow.com/questions/43270089/installing-ta-lib-creates-gcc-error – Teo Feb 02 '21 at 21:23
  • Tried installing modified setup.py from git clone, managed to get as far as TA-Lib would show as installed on ```pip list``` but then if I tried to ```import talib``` in a script it would still give me Module Not Found error – Teo Feb 02 '21 at 23:33
  • did you install it in your env? or in 'base'? – Lumber Jack Feb 03 '21 at 00:16
  • I installed it in base. – Teo Feb 03 '21 at 01:03
  • Did you find it out? – Lumber Jack Feb 03 '21 at 20:28
  • Wasn't able to launch TA-Lib as much as I tried. The closest I got was managing to install it, yet when trying to import it would get module not found error. So compiling a list of technical analysis functions myself. – Teo Feb 03 '21 at 20:35
  • Ok, I got even further thanks to you. I managed to install ta-lib module using pipenv which was a no-go until now. However, when I import talib I get a new error: ```ImportError: 2): Symbol not found: _TA_ACOS Referenced from: /Users/teo/.local/share/virtualenvs/trendingcoin-nriNAUCq/lib/python3.8/site-packages/talib/_ta_lib.cpython-38-darwin.so Expected in: flat namespace in /Users/teo/.local/share/virtualenvs/trendingcoin-nriNAUCq/lib/python3.8/site-packages/talib/_ta_lib.cpython-38-darwin.so``` – Teo Feb 05 '21 at 02:07
  • Seems like this guy is having the same problem (https://zhuanlan.zhihu.com/p/311055895) – Teo Feb 05 '21 at 02:18