From 37450cc1931e4ee0c47c5681c4c39efac011161d Mon Sep 17 00:00:00 2001 From: Congyi Wu Date: Thu, 16 Sep 2021 17:52:46 -0400 Subject: [PATCH] Call python3 instead of python Hacky fix for issue where python points to python 2.7 on MacOS. Is there a better way to get the default python interpreter that VS Code would normally use? --- src/python.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python.ts b/src/python.ts index 404176c..8d5e721 100644 --- a/src/python.ts +++ b/src/python.ts @@ -129,11 +129,11 @@ export async function runPythonCommand(cmdArgs: string[]): Promise { }); } export async function runJupytext(cmdArgs: string[]): Promise { - return runPythonCommand(['python'].concat(cmdArgs)); + return runPythonCommand(['python3'].concat(cmdArgs)); } async function testPythonCommand(): Promise { const cmd = [ - 'python', + 'python3', 'c', 'import sys;print(sys.executable);print(sys.version)', ];