TIL: Bypass the #python virtualenv wrapper scripts altogether by using
uv init --script myscript.py
uv add --script myscript.py 'somemod'
And using the following shebang line in myscript.py
#! /usr/bin/env -S uv run --script
When you start myscript.py it will create a python virtualenv on the fly with uv https://docs.astral.sh/uv/guides/scripts/#declaring-script-dependencies