A Visual Studio Code extension that automatically discovers and sets the Python interpreter for PEP 723–style scripts (with # /// script headers) using uv python find --script.
Features
Detects PEP 723 script headers in Python files
Runs uv python find --script to locate the appropriate interpreter
Updates python.defaultInterpreterPath in your workspace folder settings
Optionally auto-runs on file open or switching editors
[!WARNING]
You must run the script yourself once in order for uv to create the environment so the extension can find it. You also need to run the script when updating dependencies to ensure they get picked up.
Installation
From the Marketplace
Open VS Code and go to the Extensions view (Ctrl+Shift+X).
Search for PEP723 Interpreter Picker and click Install.
From a VSIX
Download the .vsix file from the releases page.
In VS Code, open the Command Palette (Ctrl+Shift+P) and choose Extensions: Install from VSIX...
Select the downloaded file and install.
Usage
Open or switch to a Python file containing a PEP 723 header, for example: