How to include non-Python dependencies TA-Lib - Streamlit

One of my application’s dependencies is the ‘ta-lib’ library, which is a Python wrapper for a library written in C.

I am getting the following error.

talib/_ta_lib.c:526:10: fatal error: ta-lib/ta_defs.h: No such file or directory
   #include "ta-lib/ta_defs.h"
            ^~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for TA-Lib
  Running setup.py clean for TA-Lib
1 Like

Hi pitanjal, and welcome to the forum! :wave:

This seems to be an installation issue, unrelated to Streamlit. Have you tried to make it work in your terminal? or in a Google Colab? Do you get the same error?

Best,
Charly

Hi @pitanjal -

Please see this forum post, where a user provides a workaround since TA Lib is not installable via the apt package manager:

Best,
Randy

1 Like