Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>UV Python ManagerNew to Visual Studio Code? Get it now.
UV Python Manager

UV Python Manager

anglisano

|
3 installs
| (0) | Free
Prepare Python projects with uv from the current VS Code workspace.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

UV Python Manager

UV Python Manager sets up a Python project in the current workspace using uv. The MVP guides the process with QuickPick/InputBox, creates the virtual environment, and configures the VS Code interpreter.

Requirements

  • VS Code 1.95 or later.
  • The official Python extension (ms-python.python).
  • An open and trusted workspace.
  • uv available on PATH, or explicit permission to run the official installer.

Usage

Run UV Python Manager: Setup New Python Project from the Command Palette, or right-click a folder in the Explorer and choose the same option to set up the project directly in that folder. The extension:

  1. Checks for uv and shows the installation command before running it.
  2. Prompts for the Python version, defaulting to 3.12, and the project name.
  3. Runs uv init --bare, installs the version if needed, creates .venv, and runs uv sync.
  4. Generates main.py with a Hello example and .vscode/launch.json for running and debugging it with debugpy.
  5. Generates or updates the base files and configures python.defaultInterpreterPath.

The uv installation never runs without confirmation. If it is declined, cancelled, or fails because of permissions or a proxy, no project files are created and the official documentation is offered. If the user cancels while uv is running, a neutral notice is shown instead of an error.

Managed Files

  • pyproject.toml, with PEP 621 metadata and the Hatchling backend.
  • requires-python respects the selected minor version: for example, 3.12 generates >=3.12,<3.13.
  • tool.uv.package = false, so uv sync does not try to build main.py as an installable package.
  • .python-version, updated with uv python pin to the selected version.
  • main.py, as the initial entry point with a Hello example.
  • .vscode/launch.json, with the Python: Run main.py profile.
  • .venv/, created by uv.
  • .gitignore, preserving existing content and adding only missing entries.
  • .uv-cheatsheet.md, with common uv commands in English.
  • The lockfile is produced by uv; the extension does not create a fake one.

When managed files already exist, the extension asks for confirmation before overwriting them. Repeated runs are idempotent as long as overwriting is not confirmed.

If an existing project was generated with another version, run the command again and accept overwriting pyproject.toml to update requires-python.

Configuración

{
	"uvPythonManager.defaultPythonVersion": "3.12",
	"uvPythonManager.allowUvInstallation": true,
	"uvPythonManager.openCheatsheetAfterSetup": false
}

Disable allowUvInstallation to prevent the extension from offering to run the installer. Selecting the interpreter may require reloading the VS Code window.

Security and Troubleshooting

Processes receive arguments as an array and are not built through shell concatenation. Installation is only available in trusted workspaces and shows the command, platform, and result.

If the installer completes successfully but VS Code cannot find uv, check PATH and reload the window. On networks with a proxy, configure the system proxy or install uv manually using the official documentation.

The extension does not elevate privileges automatically or hide permission errors.

Development

npm install
npm run compile
npm run typecheck
npm run lint
npm run test:unit
npm run test:integration
npm run package

Automated tests do not need network access or a real uv installation. The manual smoke test should cover macOS, Windows, and Linux, including cancellation, missing uv, PATH, reruns with existing files, and the .venv/bin/python or .venv/Scripts/python.exe paths.

Marketplace publishing is outside the MVP. npm run package generates the .vsix for inspection and local installation.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft