Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter auto-install should detect conda vs pip rather than asking the user. #3275

Closed
greazer opened this issue Jul 13, 2019 · 1 comment
Closed
Assignees

Comments

@greazer
Copy link
Member

greazer commented Jul 13, 2019

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);
}

@greazer greazer changed the title Jupyter install Jupyter auto-install should detect conda vs pip rather than asking the user. Jul 13, 2019
@DavidKutu
Copy link

Ready to be released in July

@lock lock bot locked as resolved and limited conversation to collaborators Jul 27, 2019
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants