Skip to content

Found a reason why VS cannot correctly activate the specified environment when using minicondaย #24849

@johnwas

Description

@johnwas

Below is the information of directly opening the specified environment "st" in vscode. Note that after execution, the environment is still (base)๏ผš

(base) PS D:\Develop\project\SentenceTransformers> E:\DevSoft\miniconda3\Library\bin\conda.BAT activate st
(base) PS D:\Develop\project\SentenceTransformers>

However, if conda is executed without a path, it can be activated successfully. Note that after execution, the environment is successfully switched to (st):

(base) PS D:\Develop\project\SentenceTransformers> conda activate st
(st) PS D:\Develop\project\SentenceTransformers>

By default, vscode will start conda with its own full path, which will cause the above problem.

Perhaps the conda startup script has done a lot of hacks. vscode should use the method without a path to execute conda to correctly activate the specified environment.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions