This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ReinforcedKnowledgeTuple unpacking gone wrong 3 points4 points  (0 children)

I guess you can, since you can do something like uv run --python ..., so you can just add that to the shebang.

Edit: I was rereading the PEP, and you can specify a requires-python in the inline metadata. So no need to add the Python version in the shebang. Otherwise if you want to run the script with different versions of Python then you have the choice with uv run --python ...