App libraries work locally but not when deployed?

Hello! My web app works great when I use the streamlit run ___.py command in my terminal, but when I deploy it, the error I get keeps pointing back to my lines of code trying to import different libraries. For example, “no module named dask” even though I have dask downloaded. I’m using anaconda, so I just use pip install dask and so on for all the libraries. Why is it working locally, but not when I deploy it? Is there a different way I need to download the libraries?
Thanks!

https://docs.streamlit.io/streamlit-community-cloud/get-started/deploy-an-app/app-dependencies

So am I supposed to just make a text file called requirements.txt? I’m still somewhat confused. When I try to run python -m pip install -r requirements.txt it just tells me that there is no file or directory called this. Thanks for the help!

Yes.
And only put in the non-standard libraries you actually use in your streamlit app.


So I have this requirements.txt file in my folder, and I’ve run the command I mentioned, and it still is saying I don’t have dask installed. What is going on? :frowning:

Commit this file to your github repo.
Don’t run any pip command.

1 Like

Ok that worked thank you!! Quick follow up question, when I ran the web app locally, I was able to run streamlit run --server.maxUploadSize 1000 your_script.py because I am trying to allow people to upload large files. How can I make sure this happens when deploying the app since it’s deployed within the streamlit website and not the terminal?

https://docs.streamlit.io/library/advanced-features/configuration

Do I need to do anything with the github repository? I made the config.toml file in my .streamlit folder and added
[global]
maxUploadSize = 2000
but it still doesn’t work. I tried adding it to my repository but it seemed to start trying to access my other files?