broadinstitute / wdl-ide

Rich IDE support for Workflow Description Language
BSD 3-Clause "New" or "Revised" License
40 stars 8 forks source link

?Assumption about python interpreter #51

Open SHuang-Broad opened 1 month ago

SHuang-Broad commented 1 month ago

There might be an assumption in the latest wdl-devtools that could be invalid for some user.

I'm in the process of switching to a new (Mac) computer.

When trying to use VSCode for viewing a WDL file on the new laptop, it is reporting the following.

WDL Language Server version: 0.0.90
/usr/local/bin/python3 -m venv /Users/shuang/.vscode/extensions/broadinstitute.wdl-devtools-0.0.90/out/.venv
spawn /usr/local/bin/python3 ENOENT

/Users/shuang/.vscode/extensions/broadinstitute.wdl-devtools-0.0.90/out/.venv/bin/python -m pip install --upgrade wdl-lsp
spawn /Users/shuang/.vscode/extensions/broadinstitute.wdl-devtools-0.0.90/out/.venv/bin/python ENOENT

[Error - 9:25:15 AM] wdl client: couldn't create connection to server.
Launching server using command /Users/shuang/.vscode/extensions/broadinstitute.wdl-devtools-0.0.90/out/.venv/bin/python failed. Error: spawn /Users/shuang/.vscode/extensions/broadinstitute.wdl-devtools-0.0.90/out/.venv/bin/python ENOENT

It looks like the venv wasn't successfully created, as /usr/local/bin/python3 doesn't exist (on the new machine, python3 is at /opt/homebrew/bin/python3).

dinvlad commented 1 month ago

I don't think the current version assumes the location, however what might be happening is that you'd need to set pythonPath to your Python interpreter in your workspace settings, as per https://github.com/broadinstitute/wdl-ide/blob/7808a6bd40bdadd9f5cb713ee34b69a53a7e4322/client/vscode/src/extension.ts#L84C74-L84C84

SHuang-Broad commented 1 month ago

You are right! I just needed to do the following in VSCode (Code -> Settings -> Settings)

Screenshot 2024-07-17 at 9 59 17 PM

Maybe need a documentation change?