Pyproject.toml not found when adding Python dependencies

Hello,

I’m trying to develop my first app using the Python SDK. I’d like to install some dependencies, but this unfortunately fails:

➜  homey app dependencies add requests
Updated app manifest
✓ Executing for arm64 architecture...
Restored app manifest
✖ error: No `pyproject.toml` found in current directory or any parent directory

When I created the project using the CLI (v4.0.11) I noticed there was no pyproject.toml, so I created this manually with uv init --bare. This did not fix the issue unfortunately. The folder layout is:

-rw-r--r--@ 1 derk  staff   1131 15 mrt. 13:53 app.json
-rw-r--r--@ 1 derk  staff    602 15 mrt. 13:42 app.py
drwxr-xr-x@ 4 derk  staff    128 15 mrt. 07:34 assets
-rw-r--r--@ 1 derk  staff   3175 15 mrt. 07:34 CODE_OF_CONDUCT.md
-rw-r--r--@ 1 derk  staff   2664 15 mrt. 07:34 CONTRIBUTING.md
drwxr-xr-x@ 2 derk  staff     64 15 mrt. 13:56 drivers
-rw-r--r--@ 1 derk  staff  35141 15 mrt. 07:34 LICENSE
drwxr-xr-x@ 3 derk  staff     96 15 mrt. 07:34 locales
-rw-r--r--@ 1 derk  staff    124 15 mrt. 13:34 pyproject.toml
drwxr-xr-x@ 4 derk  staff    128 15 mrt. 13:33 python_packages
-rw-r--r--@ 1 derk  staff     43 15 mrt. 07:34 README.txt
-rw-r--r--@ 1 derk  staff  78231 15 mrt. 13:40 uv.lock

What am I doing wrong?

Thanks in advance!

After running homey app create, you first need to cd to the app directory (the directory name is the ID of your app). If you have already done that, then it’s likely a bug in the Apps SDK or a part that’s missing in the app template. Not sure though since I have no experience with Python.

Seems to work for me:

$ homey app dependencies add requests
Updated app manifest
✓ Executing for arm64 architecture...
✓ Executing for amd64 architecture...
✓ Installed dependencies
requests

There’s no pyproject.toml file inside the project folder, I assume it’s installed in the Docker container though.

After running homey app create, you first need to cd to the app directory (the directory name is the ID of your app).

Thanks - yeah, that’s where I’m running the command.

Seems to work for me

Thanks. Looks to be a me-problem then. More debugging it is.

Found it! For a few years now, I’ve been running Colima as container runtime manager. To rule out if this caused the issue, I switched to Docker Desktop again and it worked instantly.

I’m not sure why Colima doesn’t work, I might look at that later.