App dependencies

The main reason that apps fail to build properly is because Streamlit Community Cloud can't find your dependencies! So make sure you:

  1. Add a requirements file for Python dependencies.
  2. (optional) Add a packages.txt file to manage any external dependencies (i.e Linux dependencies outside Python environment).


Python requirements files should be placed either in the root of your repository or in the same directory as your Streamlit app.

Streamlit looks at your requirements file's filename to determine which Python dependency manager to use in the order below. Streamlit will stop and install the first requirements file found.

FilenameDependency ManagerDocumentation


Only include packages in your requirements file that are not distributed with a standard Python installation. If any of the modules from base Python are included in the requirements file, you will get an error when you try to deploy. Additionally, we recommend that you use the latest version of Streamlit to ensure full Streamlit Community Cloud functionality. Be sure to take note of Streamlit's current requirements for package compatibility when planning your environment, especially protobuf>=3.20,<5.



You should only use one requirements file for your app. If you include more than one (e.g. requirements.txt and Pipfile). Streamlit will first look in the directory of your Streamlit app; however, if no requirements file is found, Streamlit will then look at the root of the repo.

If packages.txt exists in the root directory of your repository we automatically detect it, parse it, and install the listed packages as described below. You can read more about apt-get in their docs.

Add apt-get dependencies to packages.txt, one package name per line. For example:


Was this page helpful?

editSuggest edits

Still have questions?

Our forums are full of helpful information and Streamlit experts.