No module named 'ta'

Hi,

I am trying to deploy my first app at https://share.streamlit.io/schwnb0/commodity_dashboard/main/commodity_dashboard.py. The application runs just fine locally but runs into trouble when sharing via streamlit.io. I receive the following error message:

ModuleNotFoundError: No module named ‘ta’

In the requirements.txt file, I include:

pandas-ta==0.2.23b0

Streamlit doesn’t seem to work well with the TA-Lib or Pandas-TA libraries. Is there a workaround to fix this? If not, would you recommend a more compatible python library for technical analysis?

Thank you

TA-lib is not friendly at all to be installed LOL

Check this other thread (there is a hack there): TA-Lib Streamlit Deploy Error

Also if you find a good library for tech analysis, please let me know as well, I’d be happy to get rid off TA-lib.

Cheers

1 Like

Thank you for the quick response. Two follow-up questions just to make sure I do this properly:

  • When you say “Add gcc and make to packages.txt”, can you provide the exact text to include in the packages file? I am not familiar with the correct format of a packages.txt file.

  • When you say “Add requests to requirements.txt”, can you also provide the exact text to include in the requirements file? Not sure what version of requirements is correct.

Thank you

I have one example on:

Cheers

Your fix worked - the app is now live. Thank you.

1 Like