Create a requirements.txt file

A dependency file is required to let Connect Cloud know which Python packages to include in a given deployment. Any content that has Python code needs a requirements.txt file included in the GitHub repository.

Available Methods

Option 1. Manually create the file

If you know which packages that you need to run your application or render your document, you can create a new file named requirements.txt and add each package on its own line in the file.

faicons
shiny
shinywidgets
plotly
pandas
ridgeplot

Then you can run the following command in the terminal to install the packages.

pip install -r requirements.txt

Option 2. Use pip freeze

Alternatively, if your application or document is working as expected because the required packages are already installed on your machine, you can use pip freeze to take a snapshot of your package environment and save the output in a new requirements.txt file.

pip freeze > requirements.txt

File Location

The requirements.txt file can either be in the root directory of the repository or in the subdirectory with the primary application file.