How to run streamlit app with plotly express and yfinance?

Hello,

I’ve built nice app which use plotly express, yfinance and openai.
Now is the time for publication in internet and I can’t run my script because of following error

https://docs.streamlit.io/streamlit-community-cloud/deploy-your-app/app-dependencies

Hello Franky1

These are my dependencies, and it still doesn’t work

There is no requirements.txt file in your repo.

Ok thank you,

Could you tell me how can I add it - this is my first encounter with github ?

Hey @Mike7205 ,

Inside your dev env, run “pip freeze” to find the working versions of all your packages that are imported and used in your streamlit app. Then, put them down in requirements.txt.

You’ll have to manually create this file and add in those libraries.

Here’s an example of my requirements.txt file from a previous project:

pandas<1.2.0
plotly==4.14.3
keras==2.9.0
Pillow==9.0.1
streamlit==1.10.0
tensorflow==2.9.1
protobuf<3.20,>=3.9.2

Add this to youre repo and please redeploy. This should solve the issue. In your case, you’d have to add plotly, express and yfinance. I would also suggest taking a look at Streamlit Documentation: App dependencies - Streamlit Docs

Hope this helps!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.