talira

Python Environments

Microsoft's VS Code extension for managing Python environments and packages

open sourceMITfree

Python Environments is Microsoft's extension (ms-python.vscode-python-envs) for Visual Studio Code that creates, selects and deletes Python environments and installs or removes packages in them, using the environment manager you prefer, such as venv or conda. Its Python Projects view assigns an environment to a file, a folder or a whole project, including multi-root workspaces and monorepos, and its Environment Managers view lists every manager and environment on the machine. Quick Create makes a virtual environment with the latest Python and the workspace's dependencies, and it opens terminals with the environment already activated. Other extensions can add managers through its API. It needs the Python extension (ms-python.python), which installs it by default, and it's on the VS Code Marketplace and Open VSX.

Problems it solves

  • pick which virtual environment each folder of my Python monorepo uses in VS Code
  • create a venv and install packages without leaving the editor
  • see every Python environment on my machine in one place

Features

  • create, select and delete Python environments
  • install and uninstall packages
  • per-file, folder or project environments
  • activated terminals
  • an API for other environment managers

Limitations

  • Needs the Python extension (ms-python.python) version 2024.23 or later1

Alternatives

The same job

These do what Python Environments does.

  1. mise dev tools, env vars, task runner
  2. uv An extremely fast Python package and project manager, written in Rust.

Compare Python Environments with the top 3