From 1c4917957005ecae18e530b27938e97c9df9d867 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 21 Jun 2024 10:29:23 -0700 Subject: [PATCH] Use conda-meta to get python version (#23650) potential fix for https://github.com/microsoft/vscode-python/issues/23649 --- .../base/locators/composite/resolverUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts b/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts index bd3347dbd3348..088ae9cc97c16 100644 --- a/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts +++ b/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts @@ -19,6 +19,7 @@ import { AnacondaCompanyName, Conda, getCondaInterpreterPath, + getPythonVersionFromConda, isCondaEnvironment, } from '../../../common/environmentManagers/conda'; import { getPyenvVersionsDir, parsePyenvVersion } from '../../../common/environmentManagers/pyenv'; @@ -246,7 +247,7 @@ async function resolveCondaEnv(env: BasicEnvInfo): Promise { } else { executable = await conda.getInterpreterPathForEnvironment({ prefix: envPath }); } - const version = executable ? await getPythonVersionFromPath(executable) : undefined; + const version = executable ? await getPythonVersionFromConda(executable) : undefined; const info = buildEnvInfo({ executable, kind: PythonEnvKind.Conda,