Skip to content

Commit 1e4d8c5

Browse files
PTVSD install take three (microsoft#6638)
1 parent 8cb7616 commit 1e4d8c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/datascience/jupyter/jupyterDebugger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener {
211211
private async ptvsdCheck(server: INotebookServer): Promise<IPtvsdVersion | undefined> {
212212
// We don't want to actually import ptvsd to check version so run !python instead.
213213
// tslint:disable-next-line:no-multiline-string
214-
const ptvsdVersionResults = await this.executeSilently(server, `!python -c "import ptvsd;print(ptvsd.__version__)"`);
214+
const ptvsdVersionResults = await this.executeSilently(server, `import sys\r\n!{sys.executable} -c "import ptvsd;print(ptvsd.__version__)"`);
215215
return this.parsePtvsdVersionInfo(ptvsdVersionResults);
216216
}
217217

@@ -265,7 +265,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener {
265265

266266
private async installPtvsd(server: INotebookServer): Promise<void> {
267267
// tslint:disable-next-line:no-multiline-string
268-
const ptvsdInstallResults = await this.executeSilently(server, `!pip install ptvsd==v4.3.0b1`);
268+
const ptvsdInstallResults = await this.executeSilently(server, `import sys\r\n!{sys.executable} -m pip install ptvsd==v4.3.0b1`);
269269

270270
if (ptvsdInstallResults.length > 0) {
271271
const installResultsString = this.extractOutput(ptvsdInstallResults[0]);

0 commit comments

Comments
 (0)