Python improvement in VS Code now has a unified, streamlined workflow for managing environments, interpreters, and packages. The Python Environments extension brings consistency and readability to part of Python improvement that has traditionally been fragmented throughout instruments like venv, conda, pyenv, poetry, and pipenv. After a yr in preview—refined by means of group suggestions and real-world utilization—the extension is being rolled out for normal availability. Customers can count on to have all surroundings workflows routinely switched to utilizing the environments extension within the subsequent few weeks or can decide in instantly with the setting python.useEnvsExtension. The extension works alongside the Python extension and requires no setup—open a Python file and your environments are found routinely.
A Unified Surroundings Expertise
The extension routinely discovers environments from all main managers:
- venv
- conda
- pyenv
- poetry
- pipenv
- System Python installs
Discovery is powered by PET (Python Surroundings Instrument), a quick Rust-based scanner that finds environments reliably throughout platforms by checking your PATH, identified set up places, and configurable search paths. PET already powers surroundings discovery within the Python extension in the present day, so this is identical confirmed engine—now with a devoted UI constructed round it. You’ll be able to create, delete, change, and handle environments from a single UI—no matter which software created them.
For many customers, every part simply works out of the field. If in case you have environments in non-standard places, you may configure workspace-level search paths with glob patterns or set world search paths for shared directories outdoors your workspace.
Quicker Surroundings Creation with uv
If uv is put in, the extension makes use of it routinely for creating venv environments and putting in packages—considerably sooner than customary instruments, particularly in massive tasks. That is enabled by default by way of the python-envs.alwaysUseUv setting.
Fast Create and Customized Create
Getting a brand new surroundings up and operating is now only a click on away. Fast Create (the + button within the Surroundings Managers view) builds an surroundings utilizing your default supervisor, the newest Python model, and any workspace dependencies it finds in necessities.txt or pyproject.toml. You get a working surroundings in seconds.
While you want extra management, Customized Create (by way of Python: Create Surroundings within the Command Palette) helps you to select your surroundings supervisor, Python model, surroundings identify, and which dependency recordsdata to put in from. Each venv and conda assist creating environments immediately from VS Code; for different managers like pyenv, poetry, and pipenv, the extension discovers environments you create with their respective CLI instruments.
Python Tasks: Environments That Match Your Code Construction
Python Tasks allow you to map environments to particular folders or recordsdata. This solves widespread issues in monorepos, multi-service workspaces, blended script/bundle repositories, and multi-version testing situations.
Including a venture is easy: right-click a folder within the Explorer and choose Add as Python Challenge, or use Auto Discover to find folders with pyproject.toml or setup.py. As soon as a folder is a venture, you may assign it its personal surroundings—and that surroundings is used routinely for operating, debugging, testing, and terminal activation inside that folder.
Moveable by design
While you assign an surroundings to a venture, the extension shops the surroundings supervisor kind—not hardcoded interpreter paths. This implies your .vscode/settings.json is transportable throughout machines, working methods, and teammates. No extra fixing damaged paths after cloning a repo. Teammates can commit the settings, clone the workspace, run Fast Create, and be up and operating instantly.
Scaffold new tasks from templates
The Python Envs: Create New Challenge from Template command scaffolds a brand new venture with the appropriate construction. Select between a Bundle template (with pyproject.toml, bundle listing, and checks) or a Script template (a standalone .py file with inline dependency metadata utilizing PEP 723).
Multi-Challenge Testing
The Python extension now makes use of the Python Environments API to assist multi-project testing. Every venture will get its personal take a look at root, its personal interpreter, and its personal take a look at discovery settings. This prevents cross-contamination between companies and ensures every venture makes use of the right surroundings. For particulars, see the Multi-Challenge Testing information.
Smarter Terminal Activation
The extension introduces a brand new terminal activation mannequin with three modes, managed by the python-envs.terminal.autoActivationType setting:
shellStartup— Prompts your surroundings utilizing VS Code terminal integration, so it’s prepared earlier than the primary command runs. That is particularly necessary in the event you use GitHub Copilot to run terminal instructions, and can turn into the default in a future launch.command— Runs the activation command visibly within the terminal after it opens (at the moment the default).off— No computerized activation, for customers preferring guide management.
You can too open a terminal with any surroundings activated by right-clicking an surroundings within the Surroundings Managers view and choosing Open in Terminal.
Predictable Interpreter Choice
Interpreter choice now follows a easy, deterministic precedence order:
- A venture’s configured surroundings supervisor
- The workspace’s default surroundings supervisor (provided that you’ve explicitly set it)
python.defaultInterpreterPath(legacy)- Auto-discovery (
.venv→ system Python)
Solely settings you explicitly configure are used. Defaults by no means override your decisions. And importantly, opening a workspace by no means writes to your settings—the extension solely modifies settings.json while you make an express change like choosing an interpreter or creating an surroundings.
Constructed-In Bundle Administration
You’ll be able to handle packages immediately from the Surroundings Managers view—search and set up packages, uninstall packages, or set up from necessities.txt, pyproject.toml, or surroundings.yml. The extension routinely makes use of the right bundle supervisor for every surroundings kind (pip for venv, conda for conda environments, or uv pip when uv is enabled).
.env File Help
For builders who use surroundings variables throughout improvement, the extension helps .env recordsdata. Set python.terminal.useEnvFile to true and your variables are injected into terminals once they’re created—nice for improvement credentials and configuration that shouldn’t dwell in supply management. Configuring the trail to the surroundings file with python.envFilePath is supported with the earlier setting turned on.
Extensible by Design
The Python Environments extension isn’t only for the built-in managers. Its API is designed in order that any surroundings or bundle supervisor can construct an extension that plugs immediately into the Python sidebar, showing alongside venv, conda, and the remaining. The group is already constructing on this—take a look at the Pixi Extension for example of what’s doable.
Identified Limitations
There are a few areas the place integration remains to be catching up. We need to be upfront so you understand what to anticipate. For the complete listing, see identified points within the documentation. If you happen to run into a difficulty, report a bug — your VS Code model, Python extension model, and steps to breed assist us resolve points sooner. If you must get again to a steady state rapidly, you may disable the extension with out affecting the core Python extension.
What’s Subsequent
That is only the start. The Python Environments extension lays the inspiration for a extra built-in, clever Python improvement expertise in VS Code. Strive the extension, share your suggestions, and assist us form the way forward for Python tooling in VS Code.
Check out these new enhancements by downloading the Python Environments extension from the Market, or set up them immediately from the extensions view in Visible Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You’ll be able to study extra about Python assist in Visible Studio Code within the documentation. If you happen to run into any issues or have solutions, please file a difficulty on the Python VS Code GitHub web page.


