Python Venv SwitcherAutomatic virtual environment switching for Python monorepos. Venv Switcher automatically finds and activates the correct Python virtual environment in VS Code for the current file. FeaturesAutomatically detects virtual environments managed by:
Supports most project layouts:
SettingsCustom ProviderSetting key: A command that returns the full path to the virtual environment's Python executable. If set, overrides the default environment resolution logic. For example, use CWD TemplateSetting key: If set, update the For example, use
CommandsActivate Python EnvironmentManually trigger the environment resolution for the current file.
Run this command if the environment has changed, such as after running Reset Venv Switcher CacheRe-check for supported virtual environment providers and forget previously resolved environments. Run this command after installing a supported environment provider, such as Poetry. (Providers are checked when the extension is first activated, and when the Custom Provider setting is modified.) |