Overview Version History Q & A Rating & Review
PEP723 Interpreter Picker
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
Prerequisites
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:
# /// script
# requires-python = ">=3.11"
# dependencies = ["requests"]
# ///
import requests
print("Hello, PEP 723!")
The extension will automatically run uv python find --script
in your workspace root.
It updates your workspace’s Python interpreter setting to the discovered path.
Manual Trigger
If you prefer not to auto-run, you can manually invoke the command:
Open the Command Palette (Ctrl+Shift+P
).
Run PEP723: Pick Interpreter .
Configuration
Development
Clone the repo:
git clone https://github.com/your-name/pep723-interpreter.git
cd pep723-interpreter
Install dependencies:
npm install
Compile TypeScript:
npm run compile
Open in VS Code and press F5
to launch the Extension Development Host.
Publishing
Update the version in package.json
.
Log in with your publisher name:
vsce login <publisher-name>
Publish:
vsce publish
Contributing
Contributions are welcome! Please open issues or submit pull requests for bug fixes and enhancements.
License
MIT License. See LICENSE for details.