@@ -7,9 +7,9 @@ import { ICondaService, ICondaLocatorService, IComponentAdapter } from '../../in
7
7
import { IServiceContainer } from '../../ioc/types' ;
8
8
import { ModuleInstallerType } from '../../pythonEnvironments/info' ;
9
9
import { inDiscoveryExperiment } from '../experiments/helpers' ;
10
- import { ExecutionInfo , IConfigurationService , IExperimentService } from '../types' ;
10
+ import { ExecutionInfo , IConfigurationService , IExperimentService , Product } from '../types' ;
11
11
import { isResource } from '../utils/misc' ;
12
- import { ModuleInstaller } from './moduleInstaller' ;
12
+ import { ModuleInstaller , translateProductToModule } from './moduleInstaller' ;
13
13
import { InterpreterUri , ModuleInstallFlags } from './types' ;
14
14
15
15
/**
@@ -84,9 +84,21 @@ export class CondaInstaller extends ModuleInstaller {
84
84
const info = await condaLocatorService . getCondaEnvironment ( pythonPath ) ;
85
85
const args = [ flags & ModuleInstallFlags . upgrade ? 'update' : 'install' ] ;
86
86
87
- // Temporarily ensure tensorboard is installed from the conda-forge
88
- // channel since 2.4.1 is not yet available in the default index
89
- if ( moduleName === 'tensorboard' ) {
87
+ // Found that using conda-forge is best at packages like tensorboard & ipykernel which seem to get updated first on conda-forge
88
+ // https://github.com/microsoft/vscode-jupyter/issues/7787 & https://github.com/microsoft/vscode-python/issues/17628
89
+ // Do this just for the datascience packages.
90
+ if (
91
+ [
92
+ Product . tensorboard ,
93
+ Product . ipykernel ,
94
+ Product . pandas ,
95
+ Product . nbconvert ,
96
+ Product . jupyter ,
97
+ Product . notebook ,
98
+ ]
99
+ . map ( translateProductToModule )
100
+ . includes ( moduleName )
101
+ ) {
90
102
args . push ( '-c' , 'conda-forge' ) ;
91
103
}
92
104
if ( info && info . name ) {
0 commit comments