@@ -9,9 +9,8 @@ import { IPythonExecutionFactory } from '../../common/process/types';
9
9
import { IAsyncDisposable , IAsyncDisposableRegistry } from '../../common/types' ;
10
10
import * as localize from '../../common/utils/localize' ;
11
11
import { noop } from '../../common/utils/misc' ;
12
- import { IInterpreterService } from '../../interpreter/contracts' ;
13
12
import { IServiceContainer } from '../../ioc/types' ;
14
- import { IDataViewer , IDataViewerProvider , IJupyterVariables , INotebook } from '../types' ;
13
+ import { IDataViewer , IDataViewerProvider , IJupyterExecution , IJupyterVariables , INotebook } from '../types' ;
15
14
16
15
@injectable ( )
17
16
export class DataViewerProvider implements IDataViewerProvider , IAsyncDisposable {
@@ -21,7 +20,7 @@ export class DataViewerProvider implements IDataViewerProvider, IAsyncDisposable
21
20
@inject ( IAsyncDisposableRegistry ) asyncRegistry : IAsyncDisposableRegistry ,
22
21
@inject ( IJupyterVariables ) private variables : IJupyterVariables ,
23
22
@inject ( IPythonExecutionFactory ) private pythonFactory : IPythonExecutionFactory ,
24
- @inject ( IInterpreterService ) private interpreterService : IInterpreterService
23
+ @inject ( IJupyterExecution ) private readonly jupyterExecution : IJupyterExecution
25
24
) {
26
25
asyncRegistry . push ( this ) ;
27
26
}
@@ -45,7 +44,7 @@ export class DataViewerProvider implements IDataViewerProvider, IAsyncDisposable
45
44
}
46
45
47
46
public async getPandasVersion ( ) : Promise < { major : number ; minor : number ; build : number } | undefined > {
48
- const interpreter = await this . interpreterService . getActiveInterpreter ( ) ;
47
+ const interpreter = await this . jupyterExecution . getUsableJupyterPython ( ) ;
49
48
const launcher = await this . pythonFactory . createActivatedEnvironment ( { resource : undefined , interpreter, allowEnvironmentFetchExceptions : true } ) ;
50
49
try {
51
50
const result = await launcher . exec ( [ '-c' , 'import pandas;print(pandas.__version__)' ] , { throwOnStdErr : true } ) ;
0 commit comments