Check if python executable exists before querying user package directory. (#6345)

This commit is contained in:
Cory Rivera
2019-07-09 17:58:26 -07:00
committed by GitHub
parent 5af09213a1
commit 2d0b805549

View File

@@ -256,8 +256,7 @@ export class JupyterServerInstallation {
}
}
let isPythonInstalled = await JupyterServerInstallation.isPythonInstalled(this.apiWrapper);
if (isPythonInstalled) {
if (fs.existsSync(this._pythonExecutable)) {
let pythonUserDir = await this.getPythonUserDir(this._pythonExecutable);
if (pythonUserDir) {
this.pythonEnvVarPath = pythonUserDir + delimiter + this.pythonEnvVarPath;