From 0f61888193569f0c2347238b91540ad27e5d290a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 30 Jun 2023 00:09:52 -0700 Subject: require python >=3.7, off-by-one err in streaming --- extension/src/activation/environmentSetup.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'extension/src/activation') diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index b8c23733..2d9afaec 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -66,10 +66,18 @@ async function getPythonPipCommands() { vscode.window.showErrorMessage( "Continue requires Python3. Please install from https://www.python.org/downloads, reload VS Code, and try again." ); - throw new Error("Python3 is not installed."); + throw new Error("Python 3.7 or greater is not installed."); } } - let pipCmd = pythonCmd.endsWith("3") ? "pip3" : "pip"; + + const version = stdout.split(" ")[1]; + if (version < "3.7") { + vscode.window.showErrorMessage( + "Continue requires Python3 version 3.7 or greater. Please update your Python3 installation, reload VS Code, and try again." + ); + throw new Error("Python3 is not installed."); + } + const pipCmd = pythonCmd.endsWith("3") ? "pip3" : "pip"; return [pythonCmd, pipCmd]; } -- cgit v1.2.3-70-g09d2