From c274d7318566b676c31aa53c4bbe5877996a6bab Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 Jan 2020 11:33:36 -0800 Subject: [PATCH 1/3] Scrape output to get the details of the registered kernel --- src/client/datascience/jupyter/kernels/kernelService.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/client/datascience/jupyter/kernels/kernelService.ts b/src/client/datascience/jupyter/kernels/kernelService.ts index 59dd74754d9d..4a20c78b8f29 100644 --- a/src/client/datascience/jupyter/kernels/kernelService.ts +++ b/src/client/datascience/jupyter/kernels/kernelService.ts @@ -277,6 +277,13 @@ export class KernelService { return undefined; }); } + if (!kernel) { + // Possible user doesn't have kernelspec installed. + kernel = await this.getKernelSpecFromStdOut(output.stdout).catch(ex => { + traceError('Failed to get kernelspec from stdout', ex); + return undefined; + }); + } if (!kernel) { const error = `Kernel not created with the name ${name}, display_name ${interpreter.displayName}. Output is ${output.stdout}`; throw new Error(error); From e572be67936bc21b2964ef90b904c84166c76d56 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 Jan 2020 12:55:22 -0800 Subject: [PATCH 2/3] Bypass conda run for DS code --- src/client/datascience/jupyter/notebookStarter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/datascience/jupyter/notebookStarter.ts b/src/client/datascience/jupyter/notebookStarter.ts index b0a0ae2173e6..6656496003c1 100644 --- a/src/client/datascience/jupyter/notebookStarter.ts +++ b/src/client/datascience/jupyter/notebookStarter.ts @@ -241,7 +241,7 @@ export class NotebookStarter implements Disposable { const isActiveInterpreter = activeInterpreter ? activeInterpreter.path === interpreter.path : false; const daemon = await (isActiveInterpreter ? this.executionFactory.createDaemon({ daemonModule: PythonDaemonModule, pythonPath: interpreter.path }) - : this.executionFactory.createActivatedEnvironment({ allowEnvironmentFetchExceptions: true, interpreter })); + : this.executionFactory.createActivatedEnvironment({ allowEnvironmentFetchExceptions: true, interpreter, bypassCondaExecution: true })); // We have a small python file here that we will execute to get the server info from all running Jupyter instances const newOptions: SpawnOptions = { mergeStdOutErr: true, token: cancelToken }; const file = path.join(EXTENSION_ROOT_DIR, 'pythonFiles', 'datascience', 'getServerInfo.py'); From bde5a0b65a97d7dc7c4e5b6c423e4b8f9993c359 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 Jan 2020 13:26:01 -0800 Subject: [PATCH 3/3] Oops --- src/client/datascience/jupyter/kernels/kernelService.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/client/datascience/jupyter/kernels/kernelService.ts b/src/client/datascience/jupyter/kernels/kernelService.ts index 4a20c78b8f29..59dd74754d9d 100644 --- a/src/client/datascience/jupyter/kernels/kernelService.ts +++ b/src/client/datascience/jupyter/kernels/kernelService.ts @@ -277,13 +277,6 @@ export class KernelService { return undefined; }); } - if (!kernel) { - // Possible user doesn't have kernelspec installed. - kernel = await this.getKernelSpecFromStdOut(output.stdout).catch(ex => { - traceError('Failed to get kernelspec from stdout', ex); - return undefined; - }); - } if (!kernel) { const error = `Kernel not created with the name ${name}, display_name ${interpreter.displayName}. Output is ${output.stdout}`; throw new Error(error);