Earlier quoted context omitted.
> Save that as script.py and you can use "uv run script.py" to run it with the specified dependencies, Be aware that uv will create a full copy of that environment for each script by default. Depending on your number of scripts, this could become wasteful really fast. There is a flag "--link-mode symlink" which will link the dependencies from the cache. I'm not sure why this isn't the default, or which disadvantages…
By default it will create hard links for python packages, so it won't consume any more memory (besides the small overhead of hard links).
I plan on offering this kind of cached precompiled bytecode in PAPER, but I know that compiled bytecode includes absolute paths (used for displaying stack traces) that will presumably then refer to the cached copies. I'll want to test as best I can that this doesn't break anything more subtle.