---
title: Add Dependencies
description: How to add python and non-python dependencies to your app
---
## Python Dependencies

You have two options for specifying Python dependencies:

### Option 1: Using a `requirements.txt` file

Create a file named `requirements.txt` in your project root and list each dependency on a separate line.

For example:

```txt
python-fasthtml
monsterui
fastcore
```

### Option 2: Using PEP723 inline dependencies

Add dependencies directly to the top of your `main.py` file using the [PEP723](https://peps.python.org/pep-0723/) format.

For example:

```python
# /// script
# dependencies = [
#   "python-fasthtml",
#   "monsterui",
#   "fastcore",
# ]
# ///
# rest of your app below
```

> [!IMPORTANT]
> Use only one method to declare your Python dependencies. If you use both you'll receive an error.

## Non-Python Dependencies

For system packages create a `setup.sh` file in your project root.

For example:

```bash
#!/bin/bash
apt update -y
apt install -y imagemagick
apt install -y ffmpeg
```

> [!TIP]
> This script runs during the build process with root privileges, so you don't need to use `sudo`.

## Troubleshooting dependency installation issues

Check your app's build logs for error messages via the web dashboard, or CLI.

On the web dashboard:

1. Go to [https://pla.sh/dashboard](https://pla.sh/dashboard)
2. Find your app in the list
3. Click on "View Logs"
4. Click on "Build Logs"

On the CLI:

1. Navigate to project root directory
2. Run CLI command: `plash-logs`

Look for where requirements.txt or setup.sh runs. Th output will provide guidance on the cause of your issue.

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
