{"id":10297,"date":"2026-04-27T12:07:30","date_gmt":"2026-04-27T20:07:30","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=10297"},"modified":"2026-04-27T12:07:30","modified_gmt":"2026-04-27T20:07:30","slug":"python-in-visual-studio-code-april-2026-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-april-2026-release\/","title":{"rendered":"Python Environments Extension for VS Code- April Update"},"content":{"rendered":"<h2>Python Environments \u2014 April 2026 Release<\/h2>\n<p>We&#8217;re excited to announce the latest update to the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.vscode-python-envs\">Python Environments<\/a> extension for Visual Studio Code. This release focuses on <strong>startup performance<\/strong>, <strong>reliability<\/strong>, and <strong>quality-of-life improvements<\/strong> for terminals and package management.<\/p>\n<h2>Faster startup<\/h2>\n<p>Activation is now noticeably snappier, especially on remote and containerized workspaces. We made three key changes:<\/p>\n<p><strong>Lazy manager discovery.<\/strong> Pipenv, pyenv, and poetry environments are no longer discovered eagerly on startup. Instead, detection is deferred until you actually interact with one of those managers \u2014 for example, by opening a project that uses a <code>Pipfile<\/code> or <code>pyproject.toml<\/code> with a poetry backend. This eliminates unnecessary work for the majority of users who rely on venv, uv, or conda. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1423\">#1423<\/a>, <a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1408\">#1408<\/a>)<\/p>\n<p><strong>Faster environment resolution.<\/strong> The path from &#8220;extension activated&#8221; to &#8220;interpreter ready&#8221; is shorter. Resolution during startup and interpreter selection now completes with less overhead. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1419\">#1419<\/a>)<\/p>\n<p><strong>Narrower default workspace scanning.<\/strong> The default search pattern for virtual environments was <code>.\/**\/.venv<\/code>, which triggered a recursive scan of the entire workspace tree. On large projects \u2014 and especially over Remote-SSH \u2014 this could cause the Python Environment Tools (PET) process to hang for 30+ seconds during configuration, leading to cascading timeouts and restart loops (see <a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/issues\/1460\">#1460<\/a>, <a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/issues\/1434\">#1434<\/a>). The default is now <code>.venv<\/code> and <code>*\/.venv<\/code>, which covers the standard layout without deep traversal. If you have virtual environments nested more than one level deep, you can add custom paths via the <code>python-envs.workspaceSearchPaths<\/code> setting. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1419\">#1419<\/a>)<\/p>\n<h2>Improved reliability<\/h2>\n<p><strong>PET crash recovery.<\/strong> 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, so a transient PET failure no longer leaves you with a blank environment list. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1442\">#1442<\/a>, <a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1447\">#1447<\/a>, <a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1444\">#1444<\/a>)<\/p>\n<p><strong>Conda base environment fix.<\/strong> After a window reload, the conda base environment could be incorrectly restored as a different named environment \u2014 making it appear that your interpreter selection had silently changed. This is now fixed. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1412\">#1412<\/a>)<\/p>\n<h2>Environment updates and terminals<\/h2>\n<p><strong>Auto-refreshing package lists.<\/strong> You no longer need to manually refresh the package view after running <code>pip install<\/code> or <code>pip uninstall<\/code>. The extension now watches for metadata changes in <code>site-packages<\/code> and updates the package list automatically. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1420\">#1420<\/a>)<\/p>\n<p><strong>Multi-project terminal creation.<\/strong> In workspaces with multiple Python projects, creating a new terminal now prompts you to choose which project&#8217;s environment to activate, rather than picking one silently. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1401\">#1401<\/a>)<\/p>\n<p><strong>PowerShell activation on Windows.<\/strong> 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 <code>.ps1<\/code> activate scripts work out of the box without requiring system-wide policy changes. (<a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/pull\/1414\">#1414<\/a>)<\/p>\n<hr \/>\n<p><em>Try the update today and let us know how it works for you. If you run into issues, please file them on <a href=\"https:\/\/github.com\/microsoft\/vscode-python-environments\/issues\">GitHub<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The April 2026 release update includes the Python Environments extension&#8230; Keep on reading to learn more!<\/p>\n","protected":false},"author":105261,"featured_media":10119,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[17],"class_list":["post-10297","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python"],"acf":[],"blog_post_summary":"<p>The April 2026 release update includes the Python Environments extension&#8230; Keep on reading to learn more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/10297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/users\/105261"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/comments?post=10297"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/10297\/revisions"}],"predecessor-version":[{"id":10299,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/10297\/revisions\/10299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media\/10119"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media?parent=10297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=10297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=10297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}