Error installing requirements (Invalid Requirement)

I鈥檓 having trouble deploying my app on the streamlit cloud. The app runs fine locally, but yields a requirements error on startup globally.

Link to repo: GitHub - zachpinto/congress-prediction-streamlit: An app deployed via streamlit to predict the political parties of members of the 118th Congress based on age, tenure, and religion.

Link to requirements.txt: congress-prediction-streamlit/requirements.txt at master 路 zachpinto/congress-prediction-streamlit 路 GitHub

Thank you for your help.

You鈥檝e got a lot going on with that requirements file.

  1. First try trimming it down to the bare minimum you would need to pip install to get the necessary packages in.
  2. Be sure to reboot your app after any changes to the environment setup.
  3. Then share the terminal output from that point if you are still having problems.

How would I do this? I used conda list -e > requirements.txt to retrieve the list of installed packages in my conda environment. However, I am using PyCharm, and there is an External Libraries folder inside my project. Could this be exporting unneeded packages into requirements.txt?

Look at your code and figure out what are the things you actually import. Other than streamlit (which Streamlit Cloud installs by default, or any library that is a Python built-in like base64 or math, list out what those are, one per line (making sure you use the variation of the name for pip install).

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