Description
When the VS Code display language is Simplified Chinese (zh-cn), the Python Environments extension cannot correctly create a named Conda environment through the graphical environment creation flow.
After selecting:
- Conda
- “已命名” (
Named)
- A Python version
the environment-name input box does not appear, and no conda create --name ... command is executed.
Creating a prefix-based Conda environment through the same graphical interface works correctly. Conda itself also works correctly from the terminal.
Environment
- OS: Windows x64
- VS Code: 1.136.0
- Display language: Simplified Chinese (
zh-cn)
- Python Environments extension: 1.36.0
- Python extension: 2026.4.0
- Pylance: 2026.3.1
- Conda: 26.7.1
- Distribution: Miniconda
- Base Python: 3.14.7
- Environment manager: Conda
Relevant settings:
{
"python-envs.defaultEnvManager": "ms-python.python:conda",
"python-envs.defaultPackageManager": "ms-python.python:conda"
}
Steps to reproduce
- Set the VS Code display language to Simplified Chinese.
- Reload VS Code.
- Open a folder or workspace.
- Run the Python environment creation command from the Command Palette or Python Environments view.
- Select
Conda.
- Select
已命名 (Named).
- Select Python 3.14, or another available Python version.
- Observe that the environment-name input box is not displayed.
Actual behavior
The wizard does not proceed to the environment-name input step. In the observed run, no named-environment creation command was sent to Conda.
The prefix-based flow works correctly.
Expected behavior
After selecting 已命名 and a Python version, the wizard should display an input box for the Conda environment name and then execute the equivalent of:
conda create --name <environment-name> python=<version>
Suspected root cause
In src/managers/conda/condaStepBasedFlow.ts, the selected localized UI label is stored directly in state.envType:
state.envType = selection.label;
In the Simplified Chinese locale, CondaStrings.condaNamed is translated as:
However, the next step compares that localized value with a hard-coded English string:
return state.envType === 'Named'
? enterEnvironmentName
: selectLocation;
Therefore, under zh-cn, the effective comparison is:
which is always false. The wizard incorrectly enters the prefix/location branch instead of the named-environment branch.
There is another related hard-coded assignment in the multi-folder path:
Later logic compares state.envType with CondaStrings.condaNamed, creating the inverse localization inconsistency.
Source file:
https://github.com/microsoft/vscode-python-environments/blob/main/src/managers/conda/condaStepBasedFlow.ts
Suggested fix
As a minimal fix, use the same localized constant consistently:
return state.envType === CondaStrings.condaNamed
? enterEnvironmentName
: selectLocation;
The multi-folder assignment should also be made consistent:
state.envType = CondaStrings.condaNamed;
A more robust solution would be to avoid using localized display labels as internal state. For example:
type CondaEnvironmentType = 'named' | 'prefix';
const items = [
{
label: CondaStrings.condaNamed,
envType: 'named' as const,
},
{
label: CondaStrings.condaPrefix,
envType: 'prefix' as const,
},
];
state.envType = selection.envType;
return state.envType === 'named'
? enterEnvironmentName
: selectLocation;
This would prevent the control flow from depending on the current display language.
Additional diagnostics
- Conda is detected successfully.
- The base Conda environment is detected successfully.
- Creating a prefix-based environment from the GUI succeeds.
- Creating or resolving an environment through the Conda CLI succeeds.
- The issue occurs before
conda create is invoked.
- Reloading the VS Code window does not resolve the issue.
- Reconfiguring the default environment and package managers does not resolve it.
- The problem appears to be isolated to the localized named-environment wizard branch.
Workarounds
Possible temporary workarounds are:
-
Change the VS Code display language to English while creating the named environment.
-
Create the environment from the terminal:
conda create --name <environment-name> python=3.14
-
Use a prefix-based Conda environment.
-
Locally patch the bundled extension so the comparison uses CondaStrings.condaNamed.
The local patch may be overwritten when the extension is updated.
Description
When the VS Code display language is Simplified Chinese (
zh-cn), the Python Environments extension cannot correctly create a named Conda environment through the graphical environment creation flow.After selecting:
Named)the environment-name input box does not appear, and no
conda create --name ...command is executed.Creating a prefix-based Conda environment through the same graphical interface works correctly. Conda itself also works correctly from the terminal.
Environment
zh-cn)Relevant settings:
{ "python-envs.defaultEnvManager": "ms-python.python:conda", "python-envs.defaultPackageManager": "ms-python.python:conda" }Steps to reproduce
Conda.已命名(Named).Actual behavior
The wizard does not proceed to the environment-name input step. In the observed run, no named-environment creation command was sent to Conda.
The prefix-based flow works correctly.
Expected behavior
After selecting
已命名and a Python version, the wizard should display an input box for the Conda environment name and then execute the equivalent of:conda create --name <environment-name> python=<version>Suspected root cause
In
src/managers/conda/condaStepBasedFlow.ts, the selected localized UI label is stored directly instate.envType:In the Simplified Chinese locale,
CondaStrings.condaNamedis translated as:However, the next step compares that localized value with a hard-coded English string:
Therefore, under
zh-cn, the effective comparison is:which is always false. The wizard incorrectly enters the prefix/location branch instead of the named-environment branch.
There is another related hard-coded assignment in the multi-folder path:
Later logic compares
state.envTypewithCondaStrings.condaNamed, creating the inverse localization inconsistency.Source file:
https://github.com/microsoft/vscode-python-environments/blob/main/src/managers/conda/condaStepBasedFlow.ts
Suggested fix
As a minimal fix, use the same localized constant consistently:
The multi-folder assignment should also be made consistent:
A more robust solution would be to avoid using localized display labels as internal state. For example:
This would prevent the control flow from depending on the current display language.
Additional diagnostics
conda createis invoked.Workarounds
Possible temporary workarounds are:
Change the VS Code display language to English while creating the named environment.
Create the environment from the terminal:
conda create --name <environment-name> python=3.14Use a prefix-based Conda environment.
Locally patch the bundled extension so the comparison uses
CondaStrings.condaNamed.The local patch may be overwritten when the extension is updated.