Issues with Requirements.txt file

Each time I try to deploy an app on streamlit cloud, I encounter errors.
I can deploy and run successfully streamlit apps locally on my computer. Key difference between locally deployed app and the one deployed on streamlit cloud is the “Requirements.txt” file.

I need help to understand how to create a correct Requirements.txt file
I need help on urgent basis.

1 Like

Hey Riazahmedsg!

I just had some issues with deploying an app as well, but I learnt the following things:

  1. Name the file correctly: “requirements.txt” instead of “Requirements.txt” might make a difference (naming was my issue actually, cost me way more time then needed :stuck_out_tongue: )
  2. Only include packages in the requirements.txt that you actively import in your script-name.py file, and are not included in the standard python library (for example: don’t include “json” but do include “streamlit-tags”)
  3. Make sure you don’t have multiple package-files as described here

I hope this will help you out!
Good luck with deploying your app!

Hi

Thanks for help. Using latest versions of Streamlit and all packages does help.
But I have another issue: I can deploy only one app on Streamlit cloud. If I try to deploy another app, previous one gives error. Any suggestion?

Regards, Riaz

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