Python Environments Extension for VS Code: April 2026 Update - Q&A

By ● min read

Welcome to the April 2026 update of the Python Environments extension for Visual Studio Code. This release brings significant improvements in startup speed, system reliability, and everyday usability for terminal and package management tasks. Below we answer common questions about the new features and fixes.

What performance improvements have been made to startup?

The extension now activates much faster, especially in remote and containerized workspaces. Key changes include lazy manager discovery, which defers detection of environment managers like Pipenv, pyenv, and poetry until you actually open a project that uses one. This eliminates unnecessary overhead for most users who rely on venv, uv, or conda. Additionally, faster environment resolution shortens the path from extension activation to a ready interpreter. Finally, the default workspace scanning pattern changed from ./**/.venv (which caused deep recursive scans) to .venv and */.venv, preventing hangs on large projects—especially over Remote-SSH. If you have nested venvs, you can still add custom paths via the python-envs.workspaceSearchPaths setting.

Python Environments Extension for VS Code: April 2026 Update - Q&A
Source: devblogs.microsoft.com

How does lazy manager discovery benefit users?

Lazy manager discovery shifts the detection of certain Python environment managers—like Pipenv, pyenv, and poetry—from startup to on-demand. Previously, all managers were eagerly discovered, causing unnecessary work even if you never used them. Now, the extension only activates detection when you interact with a relevant file (e.g., a Pipfile or a pyproject.toml using poetry). This speeds up startup for the majority who use simpler managers like venv, uv, or conda. It also reduces the number of background scans, making the extension feel more responsive, particularly in large or remote workspaces. Related improvements are tracked in issues #1423 and #1408.

What changed in the default workspace scanning pattern?

The default search pattern was updated from ./**/.venv to .venv and */.venv. The old pattern recursively scanned the entire workspace tree for virtual environments, which could overwhelm the Python Environment Tools (PET) process on large projects—causing 30+ second hangs and restart loops (see #1460, #1434). The new pattern covers the standard layout without deep traversal. If you have virtual environments nested more than one level deep, you can extend the search by adding custom paths under the python-envs.workspaceSearchPaths setting. This change dramatically improves startup reliability, especially over Remote-SSH and on containerized setups.

How has the extension improved reliability after PET crashes?

Previously, if the PET process crashed during a refresh, the extension could end up in a broken state with no environments visible. The update introduces PET crash recovery: the extension now automatically retries the refresh after a crash and defensively handles empty or malformed responses. This ensures a transient PET failure no longer leaves you with a blank environment list. The fix involves improvements to robust error handling and automatic retry logic, documented in issues #1442, #1447, and #1444. Users will see a more consistent environment list even if the background process encounters temporary issues.

What was the Conda base environment issue and how was it fixed?

After reloading a VS Code window, the Conda base environment could be incorrectly restored as a different named environment. This made it appear as if your interpreter selection had silently changed, causing confusion and requiring manual re-selection. The April update corrects this restoration logic so that the Conda base environment is preserved accurately across window reloads. The fix is referenced in issue #1412. Now, users who rely on Conda can be confident that their environment selection remains stable after a reload, reducing workspace disruptions.

What improvements were made to package list updates and terminal management?

Two key enhancements improve daily workflows. First, auto-refreshing package lists mean you no longer need to manually refresh the package view after running pip install or pip uninstall. The extension watches for metadata changes in site-packages and updates the list automatically (issue #1420). Second, in workspaces with multiple Python projects, creating a new terminal now prompts you to choose which project's environment to activate, rather than silently picking one. This avoids activation of the wrong environment and gives you control (issue #1401). Both changes reduce friction and enhance productivity.

How does the extension handle PowerShell activation on Windows?

Virtual environment activation via PowerShell could fail if the system execution policy blocked scripts. The April update sets a process-scoped execution policy before running the activation script, ensuring that .ps1 activation commands execute successfully without altering the global system policy. This fix eliminates a common error for Windows users who have restrictive execution policies. The change works transparently behind the scenes, so you can activate environments from the terminal without encountering permission errors. It also aligns with best practices for running PowerShell scripts in a secure but functional manner.

Tags:

Recommended

Discover More

Gallup Poll: Over Half of U.S. Workers Actively Job-Hunting Amid Stalled Market—Therapist Warns Against Impulsive QuittingAustralia's Coal Sector Masked Methane Cuts Through Offsets and Production Decline, Report Reveals10 Critical Climate and Food Stories This FortnightTurning Trash into Treasure: Sunlight Converts Plastic Waste into Clean Hydrogen FuelHow Your Mouse Tracks Movement: A Step-by-Step Guide to Ball and Optical Technology