pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

Python shebang example(s) from readme.md not working -> `fatal PKGX_LVL >= 10`

Open nifr opened this issue 9 months ago • 1 comments

I try to run a python script with pkgx using a shebang line as described in the readme.

I do get the same error on macOS and Linux, both arm64 platforms.

#!/usr/bin/env -S pkgx [email protected] uv run

print("Hello World!")

If I execute the script, it first seems to download python and uv. It shows the progress indicator and finishes the download.

It then crashes with the following error:

× fatal PKGX_LVL >= 10
╰─➤ https://github.com/orgs/pkgxdev/discussions/11

I don't really understand what the issue discussed inside the discussion is about.

nifr avatar Feb 25 '25 12:02 nifr

You need to upgrade uv or append --script. Older uv seemed to re-exec the script which causes a fork bomb which pkgx then prevents with this abort.

mxcl avatar Feb 25 '25 14:02 mxcl

Reopen if not fixed.

mxcl avatar Mar 15 '25 17:03 mxcl