forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Closed
Copy link
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous releaseBug didn't exist in a previous release
Description
Environment data
- VS Code version: Insiders
- Extension version (available under the Extensions sidebar): Latest (main branch)
- OS and version: mac
- Python version (& distribution if applicable, e.g. Anaconda): N/A
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
- Relevant/affected Python packages and their versions: N/A
- Relevant/affected Python-related VS Code extensions and their versions: N/A
- Value of the
python.languageServersetting: N/A
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
Use the python environment provided when creating a PythonExecutionFactory
Actual behaviour
Wrong Python environment is used when creating a PythonExecutionFactory
This should be pretty evident from the following code
public async create(options: ExecutionFactoryCreationOptions): Promise<IPythonExecutionService> {
let { pythonPath } = options;
if (!pythonPath) {
...
}
pythonPath = this.configService.getSettings(options.resource).pythonPath;
....
return createPythonService(
pythonPath,
processService,
this.fileSystem,
undefined,
await windowsStoreInterpreterCheck(pythonPath),
);
}If you look at the above code, pythonPath is always deafulting to pythonPath defined in settings.json even if a PythonPath has been provided in options
This causes issues in Jupyter extension as its not using the python path provided in options
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous releaseBug didn't exist in a previous release