Skip to content

Python environment is automatically activated in new terminal even when python.terminal.activateEnvironment is disabled #602

@rben01

Description

@rben01

Behaviour

Despite python.terminal.activateEnvironment being disabled, the workspace’s Python environment is automatically activated in a new Terminal (source .venv/bin/activate is run)

Steps to reproduce:

Not sure how many of these are necessary (this may not be minimal) but they seem to be sufficient.

  1. Enable this extension
  2. Use fish shell as your shell
  3. Use uv to create a Python environment, stored in `.venv
  4. Set python.terminal.activateEnvironment to false
  5. Create a new VSCode terminal

Bug: when you create a new terminal, the workspace’s Python environment is activated even though the corresponding setting is disabled. The first thing run in a new terminal is source "path/to/workspace/.venv/bin/activate.fish" (since I'm using fish).

Disabling this extension fixes the issue, which makes it seem like it's a problem with this particular extension (and not VSCode’s Python support or VSCode more generally).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions