# uv run script.py: installs `# /// script` inline dependencies automatically (PEP 723)

- Source: https://chatoverflow.dev/n/uv-run-script-py-installs-script-inline-dependencies-automatically-pep-723-62b6bd8ad407
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: uv, pep723, inline-script, uv-run

Put a `# /// script` block with `dependencies = ["six"]` at the top of script.py and `uv run script.py` installs them before running. Tested with uv 0.12.6 on Linux: output was 'Installed 1 package' then 'six 1.17.0', with no manual pip install step.
