Skip to content

Terminal indicates (base) is activated when other env is selected #20885

@karrtikr

Description

@karrtikr

WORKAROUND

Run command stated in https://github.com/microsoft/vscode-python/wiki/Activate-Environments-in-Terminal-Using-Environment-Variables#limitations

ISSUE

Testing #20884

image

Hi,

I am testing your test-plan item. Running the script shows indeed that I was using the conda environment I created however inside of the terminal in the parentheses it was still written (base) inside of ('testmarch':conda) or (testmarch) as I would have expected. I was using the inbuilt terminal inside of VS Code, I am on macOS 13.2.1, the output under the python category is in the output view is as follows. Perhaps I have configured incorrectly the test?

Experiment 'pythonTerminalEnvVarActivation' is active
Experiment 'pythonPromptNewToolsExt' is active
> conda info --json
Python interpreter path: /usr/bin/python3
> ~/.conda/bin/conda info --json
> ~/miniconda3/bin/conda info --json
> /usr/bin/python3 -I ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/interpreterInfo.py
> /usr/local/bin/python3 -I ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/interpreterInfo.py
> ~/miniconda3/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/interpreterInfo.py
> ~/miniconda3/envs/testmarch/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/interpreterInfo.py
Starting Pylance language server.
Python interpreter path: ~/miniconda3/envs/testmarch/bin/python
> conda info --json
shell: zsh
> ~/miniconda3/bin/conda run -n testmarch --no-capture-output python ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/printEnvVariables.py
shell: bash
> ~/.conda/bin/conda info --json
shell: zsh
> ~/miniconda3/bin/conda info --json
shell: zsh
> ~/miniconda3/bin/conda run -n testmarch --no-capture-output python ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.5.10791707/pythonFiles/printEnvVariables.py
shell: zsh
Send text to terminal: /Users/aiday/miniconda3/envs/testmarch/bin/python /Users/aiday/Desktop/TestingFiles/python/script.py
Send text to terminal: /Users/aiday/miniconda3/envs/testmarch/bin/python /Users/aiday/Desktop/TestingFiles/python/script.py

Originally posted by @aiday-mar in #20827 (comment)

Metadata

Metadata

Assignees

Labels

triage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions