Create a requirements.txt file

Hello. I am extremely new to coding, 4 months to be exact. Please forgive me if I am asking a question that has been answered before, I cannot find what I am looking for in the forum, on Google or YouTube.

I have a program that runs on a local server via CLI, but when I try to deploy it into Streamlit, the libraries I am using, yfinance, fbprophet are not recognized and I get an error telling me that the library is not recognized “yfinance not found”.

I have tried creating a requirements.txt file using pip freeze > requirements.txt, but the file it produces contains 100’s of dependencies and Streamlit throws some weird errors. I have tried creating the requirementrs.txt file manually with yfinance and fbprophet, but that doesn’t work either.

My question is, how do I create the requirements.txt file needed to deploy my app? No disrespect or insult intended, but if at all possible, could the explanation be in simple, as close to everyday speak as possible, I’m still struggling with tech jargon too.

Thank you, in advance

@SpeedsMach5 Welcome to the community!

Here is my requirements file for Streamlit. It’s very simple to make in a .txt file. Save in same directory as streamlit_app.py or whatever your app file is.
Untitled

EDIT: I’m not sure if yfinance or fbprophet creates a problem, but make sure to include a line for streamlit itself

1 Like

Thank you very much! It seems to have worked. It at least got almost deployed, but now I’m running into an error that is beyond foreign to me.

Command errored out with exit status 1: /home/appuser/venv/bin/python -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-sbnbmmf

I am just now starting research on it, don’t know what I will find.

Thanks again, and thank you for the welcome.

Hello @SpeedsMach5 ,

Welcome to the coding community, its never too late to join.:sparkles:

Could you please show a screenshot of the error you are having with some little explanations, if you havent resolved it yet.