Skip to content

Commit d79bb03

Browse files
authored
Fix kernel search on unix machines (#11361)
* Fix kernel search on unix machines * Add missing import
1 parent 3e2357f commit d79bb03

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pythonFiles/vscode_datascience_helpers/daemon/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import argparse
55
import importlib
66
import json
7+
import os
78
import logging
89
import logging.config
910
import sys

src/client/datascience/kernel-launcher/kernelFinder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class KernelFinder implements IKernelFinder {
7575

7676
const diskSearch = this.findDiskPath(kernelName);
7777
const interpreterSearch = this.interpreterLocator.getInterpreters(resource, false).then((interpreters) => {
78-
const interpreterPaths = interpreters.map((interp) => interp.path);
78+
const interpreterPaths = interpreters.map((interp) => interp.sysPrefix);
7979
return this.findInterpreterPath(interpreterPaths, kernelName);
8080
});
8181

@@ -102,7 +102,7 @@ export class KernelFinder implements IKernelFinder {
102102

103103
if (this.activeInterpreter) {
104104
return this.getKernelSpec(
105-
path.join(this.activeInterpreter.path, 'share', 'jupyter', 'kernels'),
105+
path.join(this.activeInterpreter.sysPrefix, 'share', 'jupyter', 'kernels'),
106106
kernelName
107107
);
108108
}

0 commit comments

Comments
 (0)