April 2026 Python Environments Update: Faster, More Reliable, and Smarter

By • min read

The latest update to the Python Environments extension for Visual Studio Code rolls out in April 2026 with a strong focus on startup speed, dependability, and everyday usability improvements. Key enhancements include lazy detection of environment managers, smarter workspace scanning, automatic recovery from crashes, and smoother terminal integration. Below, we dive into the most significant changes with detailed Q&A.

What specific performance improvements have been made in this update?

The extension now activates much faster, especially on remote or containerized workspaces. Three core changes drive this: lazy manager discovery avoids scanning for Pipenv, pyenv, and poetry until you actually work with their projects; faster environment resolution shortens the path from activation to having an interpreter ready; and narrower default workspace scanning replaces the recursive ./**/.venv pattern with .venv and */.venv, preventing long hangs on large projects. If you have deeper nestings, you can customize paths via the python-envs.workspaceSearchPaths setting. These changes collectively eliminate the 30+ second stalls that previously occurred over Remote-SSH.

April 2026 Python Environments Update: Faster, More Reliable, and Smarter
Source: devblogs.microsoft.com

How does lazy manager discovery work?

Previously, the extension eagerly discovered all supported environment managers (Pipenv, pyenv, poetry) on every startup, even if you never used them. This wasted resources. Now, detection is deferred until you interact with a project that uses one of those managers—for example, opening a folder containing a Pipfile or a pyproject.toml with a poetry backend. The majority of users who rely on venv, uv, or conda will see no overhead at all. This optimization is especially beneficial on remote setups where file system access is slower. (See related issues #1423, #1408)

What reliability improvements address PET crashes?

When the Python Environment Tools (PET) process crashed mid-refresh, the extension could enter a broken state with no environments shown—leaving you staring at an empty list. The April update introduces automatic retry after a crash, along with defensive handling of empty or malformed responses. Now a transient PET failure no longer permanently breaks the environment view. This is tracked in issues #1442, #1447, and #1444. Additionally, a fix ensures that the conda base environment name is preserved correctly after a window reload; previously it could silently revert to a different named environment, which caused confusion. That fix is tracked in #1412.

How has package list refreshing been improved?

You no longer need to manually refresh the package view after running pip install or pip uninstall. The extension now watches for metadata changes inside the site-packages folder and automatically updates the package list. This means the installed packages shown in the Environments view stay in sync with your terminal actions, saving you a manual click. The auto-refresh behavior is designed to be efficient, only triggering when actual modifications occur. (Issue #1420)

What changes were made for creating terminals in multi-project workspaces?

In workspaces that contain multiple Python projects, creating a new terminal now prompts you to choose which project’s environment to activate, rather than silently picking one. This eliminates guesswork and accidental activation of the wrong environment. The prompt appears each time you open a new terminal, ensuring you always know which environment is active. This quality-of-life improvement makes it much clearer when working across several projects—for instance, a monorepo with separate Python services. (Issue #1401)

How does the extension handle PowerShell activation on Windows now?

Activating a virtual environment via PowerShell on Windows could fail if the system’s execution policy blocked scripts. The April update addresses this by setting a process-scoped execution policy before running the activation script. This ensures that the .ps1 script can execute without altering the machine-wide or user-level policies. The change is transparent to the user—no configuration needed—and reliably activates the environment even on locked-down systems. This fix is part of the terminal-related improvements in this release.

How can users benefit from the new workspace scanning default?

The default search pattern for virtual environments was previously ./**/.venv, which caused a recursive scan of the entire workspace tree. On large projects (especially over Remote-SSH), this could make the PET process hang for 30+ seconds during configuration, leading to cascading timeouts and restart loops. The new default is .venv and */.venv—covering the standard layout (single and one-level-deep .venv folders) without deep traversal. For advanced setups with environments nested deeper, you can add custom paths via the python-envs.workspaceSearchPaths setting. This change dramatically reduces startup delays. (Issue #1419)

Recommended

Discover More

Why Cloud Providers Should Prioritize Fundamentals Over Agentic AI HypePython's Official Blog Finds a New Home: What You Need to KnowBitwarden Faces Unease After Quiet Executive Shake-Up and Value ChangesHow to Decode Earth’s Nocturnal Glow: A Guide to Nighttime Light Change MapsExclusive Early Look: Google's Aluminium OS Leak Reveals Desktop Ambitions