diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-30 00:09:52 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-30 00:09:52 -0700 |
commit | 9427f07d6c60749205922d0f4cab5de73dec438b (patch) | |
tree | 99e246769416f0de2380ea2c5d34a09c4995c0cc /extension/src/activation/environmentSetup.ts | |
parent | d47c4cafb856ffe2efd7d08ceddc8ceda475a8c6 (diff) | |
download | sncontinue-9427f07d6c60749205922d0f4cab5de73dec438b.tar.gz sncontinue-9427f07d6c60749205922d0f4cab5de73dec438b.tar.bz2 sncontinue-9427f07d6c60749205922d0f4cab5de73dec438b.zip |
require python >=3.7, off-by-one err in streaming
Diffstat (limited to 'extension/src/activation/environmentSetup.ts')
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 12 |
1 files changed, 10 insertions, 2 deletions
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]; } |