Flash.itsportsbetDocsScience & Space
Related
10 Fascinating Facts About Fields in Particle PhysicsYour Speech Patterns Could Be an Early Warning Sign for Dementia: What the Science SaysOptimizing Your VS Code Python Development: A Guide to the Python Environments Extension UpdatesUnlocking Memory: How Blocking a Single Protein Could Transform Alzheimer's TreatmentQ&A: Ana Inês Inácio – Engineering RF Signals and Global CommunitiesMassive Cambrian Fossil Discovery Reshapes Understanding of Early Animal EvolutionThe Growing Teacher Exodus: Understanding Why Educators Are Leaving the ClassroomThe Hidden Cost of AI Efficiency: How Reducing Interpersonal 'Bugs' May Weaken Team Bonds

VS Code Python Environments Extension Gets Performance Overhaul and Usability Upgrades

Last updated: 2026-05-14 19:26:02 · Science & Space

Faster Startup and Smoother Activation

The latest update to the Python Environments extension for Visual Studio Code brings noticeable speed improvements, especially for remote and containerized workspaces. Three key changes make activation snappier:

VS Code Python Environments Extension Gets Performance Overhaul and Usability Upgrades
Source: devblogs.microsoft.com

Lazy Discovery of Package Managers

Previously, the extension eagerly scanned for Pipenv, pyenv, and Poetry environments at startup, which wasted resources for most users who rely on venv, uv, or Conda. Now, detection is deferred until you actually interact with one of those tools—for example, opening a project with a Pipfile or pyproject.toml using a Poetry backend. This change eliminates unnecessary work and makes startup faster. (See issues #1423, #1408)

Faster Environment Resolution

The path from extension activation to a ready interpreter is now shorter. The resolution process during startup and interpreter selection completes with less overhead, giving you a working interpreter sooner. (#1419)

Narrower Workspace Scanning

The default search pattern for virtual environments was ./**/.venv, which caused a recursive scan of the entire workspace tree. On large projects—especially over Remote-SSH—this could hang the Python Environment Tools (PET) process for over 30 seconds during configuration, leading to timeouts and restart loops (see #1460, #1434). The new default is .venv and */.venv, covering standard layouts without deep traversal. If you have environments nested more than one level deep, add custom paths with the python-envs.workspaceSearchPaths setting. (#1419)

Improved Reliability and Crash Recovery

PET Crash Recovery

When the PET process crashed mid-refresh, the extension could end up in a broken state with no environments visible. We now retry the refresh after a crash and handle empty or malformed responses defensively. A transient PET failure no longer leaves you with a blank environment list. (#1442, #1447, #1444)

Conda Base Environment Fix

After a window reload, the Conda base environment could be incorrectly restored as a different named environment, making it appear that your interpreter selection had silently changed. This bug is now fixed. (#1412)

Better Terminal and Package Management

Auto-Refreshing Package Lists

You no longer need to manually refresh the package view after running pip install or pip uninstall. The extension now watches for metadata changes in site-packages and updates the package list automatically. (#1420)

Multi-Project Terminal Creation

In workspaces with multiple Python projects, creating a new terminal now prompts you to choose which project's environment to activate, rather than picking one silently. This gives you more control over which environment is used. (#1401)

PowerShell Activation on Windows

Virtual environment activation via PowerShell could fail if the system execution policy blocked scripts. The extension now sets a process-scoped execution policy before running activation, so .ps1 scripts run reliably. This resolves a common issue for Windows users.