Skip to content

Native Environment Locator fails to register Miniforge/Conda interpreter, while JS Locator works #26057

Description

@Fraaaaaaaaank

Native Environment Locator fails to register Miniforge/Conda interpreter, while JS Locator works

(written and summarized by AI)

Environment

VS Code

Version: 1.130.0 (x64)
Commit: 1b6a188127eeaf9194f945eb6eb89a657e93c54c

Extensions

ms-python.python@2026.4.0
ms-python.vscode-pylance@2026.3.1
ms-python.debugpy@2026.6.0

OS

Windows 11

Conda Distribution

Miniforge

Installation Path

C:\ProgramData\miniforge3

Description

The Python extension fails to discover/register Python interpreters when the Native Environment Locator is enabled.

The interpreter appears to be detected internally according to the Python Environments logs, but the VS Code UI remains stuck on "Select Interpreter" and Python files cannot be run through the extension.

Switching the locator from Native to JS immediately resolves the problem.


Expected Behavior

VS Code should discover, register, and allow selection of the Conda/Miniforge interpreter.


Actual Behavior

  • Status bar continues to show:
Select Interpreter
  • Python files cannot be run via the Python extension.
  • Interpreter selection UI does not properly register available interpreters.
  • Python Environments logs repeatedly report autoselection failures.

Verified Working Components

The Conda installation itself appears healthy.

Python executable

where python

returns

C:\ProgramData\miniforge3\python.exe

Python version

python --version

returns

Python 3.12.8

Running Python scripts

python test.py

works correctly.

A test script containing:

import sys
print(sys.executable)

prints:

C:\ProgramData\miniforge3\python.exe

Conda configuration

conda info --base

returns

C:\ProgramData\miniforge3
conda env list

shows

base * C:\ProgramData\miniforge3

Relevant Log Output

The Native Locator appears to discover the interpreter successfully:

[info] Active interpreter [C:\Users\<user>\Projects\<workspace>]:
C:\ProgramData\miniforge3\python.exe

However, the UI still displays:

Select Interpreter

and no usable interpreter becomes available.

Repeated errors include:

[error] Autoselection timeout out, this is likely a issue with how consumer called execution factory API. Using default python to execute.

followed by:

[error] Command failed: python -c "import sys;print(sys.executable)"

Der Befehl "python" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

Additional repeated errors:

[error] Unable to find workspace for given file

Suspicious Discovery Attempts

The Native Locator appears to attempt Conda discovery against locations that are not Conda installations:

~\.conda\Scripts\conda.exe info --json
~\.condarc\Scripts\conda.exe info --json
~\.condarc.bak\Scripts\conda.exe info --json

.condarc and .condarc.bak are configuration files and not Conda installations.

This behavior seems suspicious and may be related to the failed environment registration.


Conda History

The system previously had a non-standard Conda configuration:

root_prefix: C:\Users\<user>\.conda

This setting was removed.

After correction:

conda info --base

returns

C:\ProgramData\miniforge3

and

conda env list

shows

base * C:\ProgramData\miniforge3

The issue persists despite the corrected Conda configuration.


Workaround

Changing the Environment Locator from Native to JS immediately resolves the issue.

After switching to JS Locator:

  • Interpreter discovery works normally.
  • The interpreter becomes selectable.
  • The status bar updates correctly.
  • Python files execute normally.

Reproduction

  1. Use Miniforge installed in:
C:\ProgramData\miniforge3
  1. Enable the Native Environment Locator.
  2. Reload VS Code.
  3. Observe that logs report an active interpreter:
C:\ProgramData\miniforge3\python.exe
  1. Status bar remains:
Select Interpreter
  1. Switch Environment Locator to JS.
  2. Reload VS Code.
  3. Interpreter discovery and selection work immediately.

Summary

The Native Locator appears capable of discovering the interpreter but fails to properly register or expose it to the VS Code UI. The JS Locator succeeds on the same machine using the same Conda installation and interpreter. This suggests a bug or edge case in the Native Environment Locator implementation.

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