From 88d099ba1037b8b66d2d8cd9fda88ee0488257fe Mon Sep 17 00:00:00 2001 From: Daniel Rodriguez Date: Fri, 24 Jun 2022 16:19:38 -0400 Subject: [PATCH] using Jupyter magic commands % --- .../data-viewing/dataViewerDependencyService.unit.test.ts | 2 +- .../extension-side/dataviewer/dataViewerDependencyService.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts b/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts index 22937c3a039..8b00d5189ed 100644 --- a/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts +++ b/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts @@ -119,7 +119,7 @@ suite('DataScience - DataViewerDependencyService', () => { assert.equal(await resultPromise, undefined); assert.deepEqual( stub.getCalls().map((call) => call.lastArg), - [getVersionOfPandasCommand, 'pip install pandas'] + [getVersionOfPandasCommand, '%pip install pandas'] ); }); diff --git a/src/webviews/extension-side/dataviewer/dataViewerDependencyService.ts b/src/webviews/extension-side/dataviewer/dataViewerDependencyService.ts index a57eafbd5be..daaef5793c4 100644 --- a/src/webviews/extension-side/dataviewer/dataViewerDependencyService.ts +++ b/src/webviews/extension-side/dataviewer/dataViewerDependencyService.ts @@ -82,7 +82,8 @@ export class DataViewerDependencyService implements IDataViewerDependencyService Common.install() ); - const command = `${this.packaging(kernel)} install pandas`; + // From https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-pip (%conda is here as well). + const command = `%${this.packaging(kernel)} install pandas`; if (selection === Common.install()) { try {