pass in pythonexecutable when getting packages (#14550)

This commit is contained in:
Lucy Zhang
2021-03-04 15:26:46 -08:00
committed by GitHub
parent 99d46917e8
commit 8e07a6f239

View File

@@ -167,7 +167,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
await this.installPythonPackage(backgroundOperation, this._usingExistingPython, this._pythonInstallationPath, this.outputChannel);
// reinstall pip to make sure !pip command works
if (!this._usingExistingPython) {
let packages: PythonPkgDetails[] = await this.getInstalledPipPackages();
let packages: PythonPkgDetails[] = await this.getInstalledPipPackages(this._pythonExecutable);
let pip: PythonPkgDetails = packages.find(x => x.name === 'pip');
let cmd = `"${this._pythonExecutable}" -m pip install --force-reinstall pip=="${pip.version}"`;
await this.executeBufferedCommand(cmd);