diff --git a/extensions/notebook/src/common/constants.ts b/extensions/notebook/src/common/constants.ts index f8822f05cd..2b49d0563b 100644 --- a/extensions/notebook/src/common/constants.ts +++ b/extensions/notebook/src/common/constants.ts @@ -28,6 +28,7 @@ export const allowRoot = 'allowRoot'; export const winPlatform = 'win32'; export const macPlatform = 'darwin'; +export const linuxPlatform = 'linux'; export const jupyterNotebookProviderId = 'jupyter'; export const jupyterConfigRootFolder = 'jupyter_config'; diff --git a/extensions/notebook/src/dialog/configurePython/configurePythonWizard.ts b/extensions/notebook/src/dialog/configurePython/configurePythonWizard.ts index 6688d50c4c..710ced1d56 100644 --- a/extensions/notebook/src/dialog/configurePython/configurePythonWizard.ts +++ b/extensions/notebook/src/dialog/configurePython/configurePythonWizard.ts @@ -13,6 +13,8 @@ import * as utils from '../../common/utils'; import { promises as fs } from 'fs'; import { Deferred } from '../../common/promise'; import { PythonPathLookup } from '../pythonPathLookup'; +import { linuxPlatform, macPlatform } from '../../common/constants'; +import * as os from 'os'; const localize = nls.loadMessageBundle(); @@ -56,6 +58,10 @@ export class ConfigurePythonWizard { pythonLocation: JupyterServerInstallation.getPythonPathSetting(), useExistingPython: JupyterServerInstallation.getExistingPythonSetting() }; + // Default to using existing Python on Mac and Linux, since they have python installed by default + if (os.platform() === macPlatform || os.platform() === linuxPlatform) { + this.model.useExistingPython = true; + } let pages: Map = new Map();