# Add Dependencies


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

## 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
```

<div>

> **Important**
>
> Use only one method to declare your Python dependencies. If you use
> both you’ll receive an error.

</div>

## 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
```

<div>

> **Tip**
>
> This script runs during the build process with root privileges, so you
> don’t need to use `sudo`.

</div>

## 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>
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.
