Skip to content

This extension does not work with multi-root workspaces and Pixi #1107

@RaphaelMelanconAtBentley

Description

I tried to use this extension and nothing seems to work as intended...

I am on:

  • WSL2 Ubuntu 24.04 (but same behavior on Windows)
  • bash
  • Latest VSCode (1.108.1)
  • Python extension version v2026.0.0
  • Python Environments extension version v1.16.0
  • Pixi Code extension v0.1.5

Here is a list of issues I encountered:

  • New terminals do not activate the selected Pixi environment for the workspace.

    • The terminal environment contribution appears correct but the environment isn't activated:

      # Terminal Environment Changes
      
      ## Extension: ms-python.vscode-python-envs
      
      Environment variables for shell activation
      
      - `VSCODE_PYTHON_PWSH_ACTIVATE=/home/pan/.pixi/bin/pixi shell --manifest-path /home/pan/repositories/TestPythonEnvironments/pixi.toml -e package-b`
      - `VSCODE_PYTHON_BASH_ACTIVATE=/home/pan/.pixi/bin/pixi shell --manifest-path /home/pan/repositories/TestPythonEnvironments/pixi.toml -e package-b`
      - `VSCODE_PYTHON_FISH_ACTIVATE=/home/pan/.pixi/bin/pixi shell --manifest-path /home/pan/repositories/TestPythonEnvironments/pixi.toml -e package-b`
      - `VSCODE_PYTHON_ZSH_ACTIVATE=/home/pan/.pixi/bin/pixi shell --manifest-path /home/pan/repositories/TestPythonEnvironments/pixi.toml -e package-b`
      ...
      

      Uses the last environment activated (package-a) instead of the selected one (package-b):
      Image

  • Debugger appears to use the multi-root workspace's root's selected environment instead of the one for the workspace the file is in:

    Image Image
  • The Run Python File sometimes opens a terminal with the activation command, but then nothing happens.

I have created a minimal reproduction repo here: https://github.com/RaphaelMelanconAtBentley/test-vscode-environments-extension

Metadata

Metadata

Assignees

Labels

area-environmentEnvironment, interpreter related issues.bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions