A new syntax has just been approved for Python scripts which specify their own requirements, equivalent to the # requirements: package_name
lines used by the new script editor in Rhino 8. It could be cool if Rhino supported this syntax:
# /// script
# dependencies = [
# "requests<3",
# "rich",
# ]
# requires-python = ">=3.11"
# ///