An update to issue microsoft/vscode-python#5682. When auto installing jupyter we shouldn't ask whether they are installing to a conda or pip environment. We should detect whether it's conda (or since you guys are already part of the extension, maybe you can rely on internal information about the loaded interpreters).
Here's how the python extension detects whether a particular python installation is conda.
/**
* Determines whether a python interpreter is a conda environment or not.
* The check is done by simply looking for the 'conda-meta' directory.
* @param {string} interpreterPath
* @returns {Promise}
* @memberof CondaService
*/
public async isCondaEnvironment(interpreterPath: string): Promise {
const dir = path.dirname(interpreterPath);
const isWindows = this.platform.isWindows;
const condaMetaDirectory = isWindows ? path.join(dir, 'conda-meta') : path.join(dir, '..', 'conda-meta');
return this.fileSystem.directoryExists(condaMetaDirectory);
}
An update to issue microsoft/vscode-python#5682. When auto installing jupyter we shouldn't ask whether they are installing to a conda or pip environment. We should detect whether it's conda (or since you guys are already part of the extension, maybe you can rely on internal information about the loaded interpreters).
Here's how the python extension detects whether a particular python installation is conda.
/**
* Determines whether a python interpreter is a conda environment or not.
* The check is done by simply looking for the 'conda-meta' directory.
* @param {string} interpreterPath
* @returns {Promise}
* @memberof CondaService
*/
public async isCondaEnvironment(interpreterPath: string): Promise {
const dir = path.dirname(interpreterPath);
const isWindows = this.platform.isWindows;
const condaMetaDirectory = isWindows ? path.join(dir, 'conda-meta') : path.join(dir, '..', 'conda-meta');
return this.fileSystem.directoryExists(condaMetaDirectory);
}