From 79d0239362ee344bb9e23c56de837353537fa6ae Mon Sep 17 00:00:00 2001 From: Cory Rivera Date: Wed, 25 Sep 2019 11:23:39 -0700 Subject: [PATCH] Use python3 as the default python version in Spark sessions. (#7353) --- extensions/notebook/src/jupyter/jupyterSessionManager.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/notebook/src/jupyter/jupyterSessionManager.ts b/extensions/notebook/src/jupyter/jupyterSessionManager.ts index e96e5e7fa8..6d9573bae9 100644 --- a/extensions/notebook/src/jupyter/jupyterSessionManager.ts +++ b/extensions/notebook/src/jupyter/jupyterSessionManager.ts @@ -9,6 +9,7 @@ import * as fs from 'fs-extra'; import * as nls from 'vscode-nls'; import * as vscode from 'vscode'; import * as path from 'path'; +import { EOL } from 'os'; import * as utils from '../common/utils'; const localize = nls.loadMessageBundle(); @@ -266,6 +267,11 @@ export class JupyterSession implements nb.ISession { code: doNotCallChangeEndpointParams }, true); await future.done; + + future = this.sessionImpl.kernel.requestExecute({ + code: `%%configure -f${EOL}{"conf": {"spark.pyspark.python": "python3"}}` + }, true); + await future.done; } }