Open Zhangyanbo opened 9 months ago
Me too! Have u solved this problem?
Me too! Have u solved this problem?
@chenyifanthu See this issue in conda repo: https://github.com/conda/conda/issues/13585#issuecomment-1987090935 Not an elegant solution, but it works.
As I stated here conda/conda#13585 (comment), I think it's a VSCode problem after investigating the issue and trying some fixes.
@meganrogge I still didn't figure out the problem but it happens to me only under these conditions:
settings.json
file, the parameter "terminal.integrated.inheritEnv" is set to False, i.e. "terminal.integrated.inheritEnv": false
. If set to True (which is the default value), I don't have this issue anymore..zshrc
file on my local computer (in my home user), I am activating the exact same conda environment that the one I choose as the Python interpreter in VSCode. Hence following @Zhangyanbo nomenclature, I have something like conda activate ML
somewhere in in my .zshrc
file, and I select ML as the Python interpreter in VSCode before opening a terminal session. If I delete this line activating ML environment OR if I select another Python interpreter than ML in VSCode (even another conda environment from the same miniconda installation), I don't have the issue anymore. Moreover this doesn't depend on the specific conda environment, i.e. if I choose another freshly created environment called test and I am activating it in my .zshrc
file and choosing it as Python interpreter, then I have the same issue.I think the issue happens somehow when the environment variables are set to activate the specific ML environment. When staying in the above "bug" conditions, comparing environments variables from the "buggy" terminal with another one where I selected another conda env (say test) as Python interpreter, I see some differences: CONDA_PREFIX
variable is set for test, not for ML (only CONDA_PREFIX_2
and later are defined for ML), CONDA_DEFAULT_ENV
is set for test but not for ML, /Users/lilianbonnet/miniconda3/envs/test/bin
and other paths are added to PATH
for test but not for ML), and other variables are different.
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
Notes