diff --git a/extensions/notebook/src/jupyter/jupyterServerInstallation.ts b/extensions/notebook/src/jupyter/jupyterServerInstallation.ts index 63b1b9e1a5..cefeca3b71 100644 --- a/extensions/notebook/src/jupyter/jupyterServerInstallation.ts +++ b/extensions/notebook/src/jupyter/jupyterServerInstallation.ts @@ -286,7 +286,7 @@ export default class JupyterServerInstallation { private async installJupyterProsePackage(): Promise { if (process.platform === constants.winPlatform) { let requirements = path.join(this._pythonPackageDir, 'requirements.txt'); - let installJupyterCommand = `${this._pythonExecutable} -m pip install --no-index -r ${requirements} --find-links ${this._pythonPackageDir} --no-warn-script-location`; + let installJupyterCommand = `"${this._pythonExecutable}" -m pip install --no-index -r "${requirements}" --find-links "${this._pythonPackageDir}" --no-warn-script-location`; this.outputChannel.show(true); this.outputChannel.appendLine(localize('msgInstallStart', 'Installing required packages to run Notebooks...')); await utils.executeStreamedCommand(installJupyterCommand, this.outputChannel); @@ -299,7 +299,7 @@ export default class JupyterServerInstallation { private async installSparkMagic(): Promise { if (process.platform === constants.winPlatform) { let sparkWheel = path.join(this._pythonPackageDir, `sparkmagic-${constants.sparkMagicVersion}-py3-none-any.whl`); - let installSparkMagic = `${this._pythonExecutable} -m pip install --no-index ${sparkWheel} --find-links ${this._pythonPackageDir} --no-warn-script-location`; + let installSparkMagic = `"${this._pythonExecutable}" -m pip install --no-index "${sparkWheel}" --find-links "${this._pythonPackageDir}" --no-warn-script-location`; this.outputChannel.show(true); this.outputChannel.appendLine(localize('msgInstallingSpark', 'Installing SparkMagic...')); await utils.executeStreamedCommand(installSparkMagic, this.outputChannel); diff --git a/extensions/notebook/src/jupyter/serverInstance.ts b/extensions/notebook/src/jupyter/serverInstance.ts index 82a12655ad..cdf7f73e65 100644 --- a/extensions/notebook/src/jupyter/serverInstance.ts +++ b/extensions/notebook/src/jupyter/serverInstance.ts @@ -156,7 +156,7 @@ export class PerNotebookServerInstance implements IServerInstance { } if (this.isStarted) { let install = this.options.install; - let stopCommand = `${install.pythonExecutable} -m jupyter notebook stop ${this._port}`; + let stopCommand = `"${install.pythonExecutable}" -m jupyter notebook stop ${this._port}`; await this.utils.executeBufferedCommand(stopCommand, install.execOptions, install.outputChannel); this._isStarted = false; this.utils.checkProcessDied(this.childProcess); @@ -236,7 +236,7 @@ export class PerNotebookServerInstance implements IServerInstance { let token = await notebookUtils.getRandomToken(); this._uri = vscode.Uri.parse(`http://localhost:${port}/?token=${token}`); this._port = port.toString(); - let startCommand = `${this.options.install.pythonExecutable} -m jupyter notebook --no-browser --notebook-dir "${notebookDirectory}" --port=${port} --NotebookApp.token=${token}`; + let startCommand = `"${this.options.install.pythonExecutable}" -m jupyter notebook --no-browser --notebook-dir "${notebookDirectory}" --port=${port} --NotebookApp.token=${token}`; this.notifyStarting(this.options.install, startCommand); // Execute the command