diff --git a/lib/main.js b/lib/main.js index 0b61cd62..4e004acb 100644 --- a/lib/main.js +++ b/lib/main.js @@ -79,11 +79,15 @@ class PythonLanguageClient extends AutoLanguageClient { } let pythonBin = atom.config.get("ide-python.python") || "python3" + + // replace $PIPENV_PATH in the path + pythonBin = replacePipEnvPathVar(pythonBin, venvPath) + + // check if it exists if (whichSync(pythonBin, { nothrow: true }) === null) { pythonBin = "python" } - - this.python = replacePipEnvPathVar(pythonBin, venvPath) + this.python = pythonBin const childProcess = super.spawn(this.python, ["-m", this.getPyLs()], { cwd: projectPath,