You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python debug Error: spawn ${workspaceFolder}\env\Scripts\python.exe ENOENT, "env" is python venv directory , I modify .vscode/setting.json >> python.pythonPath to a full dir and it worked!
VS Code Info
VS Code version: Code - Insiders 1.20.0-insider (5190885, 2018-02-01T14:21:12.284Z)
OS version: Windows_NT x64 10.0.16299
System Info
Item
Value
CPUs
Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz (4 x 2295)
Memory (System)
11.91GB (6.19GB free)
Process Argv
C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe
@zzylog7 please could you test this on the latest stable version of vscode and the latest version of the extension (not insiders build if vscode).
Please confirm that the folder you have opened in vscode is newAnt.
I'm hitting this too, right after I upgraded to the latest VSCode 1.20.0. Previously I had vscode-python 2018.1.0. This issue did not happen with vscode-python 2018.1.0 and the previous version of VSCode.
My previous pythonPath was: "${workspaceRoot}/.virtualenv/bin/python". I am using .virtualenv as a symlink to a virtualenv in my user dir, managed by virtualenvwrapper. But even if I don't use a symlink, and have the entire virtualenv in my workspace folder with the python path pointing to it, it doesn't work.
Note: I'm not sure if this is related, but in at least VSCode 1.20.0, it looks like workspaceRoot support has been deprecated in favor of workspaceFolder. I didn't even realize that the workspaceRoot env var was deprecated. Support hasn't been dropped though, I can still use workspaceRoot in launch.json.
But even if I make pythonPath = "${workspaceFolder}/.virtualenv/bin/python" that doesn't work.
I'm having the same issue as well. vscode 1.20.0; vscode-python 2018.1
This might be related to the multi-root workspace; when I directly open the project, the setting "python.pythonPath": "${workspaceFolder}/.venv/bin/python" works as expected, but when I switch to the multi-root workspace, it does not manage to find the environment (and I can't find it in the prompt Select Interpreter).
Seeing this as well with vscode 1.20.0, vscode-python 2018.1.0. I was not seeing an issue until I updated to vscode 1.20.0 from 1.19.3.
I have my python.pythonPath set to "${workspaceRoot}/.env/Scripts/python.exe" it did not work, changing to "${workspaceFolder}/.env/Scripts/python.exe" also did not work.
As mentioned above changing to a fully qualified path or relative path, ./.env/Scripts/Python.exe, worked. Using the environment selection IO to choose the correct virtualenv also doesn't work since it auto fills it as "${workspaceFolder}/.env/Scripts/python.exe"
${config:python.pythonPath} seems to be NOT working inside the tasks.json file for building the task.
python.pythonPath is set to ${workspaceFolder}/venv/bin/python under Users settings.
When the command is set to ${workspaceFolder}/venv/bin/python instead of ${config:python.pythonPath}, it is working fine.
Though ${config:python.pythonPath} seems to be working fine with the launch.json for the debugger.
Activity
DonJayamanne commentedon Feb 2, 2018
@zzylog7 please could you go into your work space settings and let me know the exact value of the
"python.pythonPath"setting?chrzamz commentedon Feb 2, 2018
DonJayamanne commentedon Feb 4, 2018
@zzylog7 please could you test this on the latest stable version of vscode and the latest version of the extension (not insiders build if vscode).
Please confirm that the folder you have opened in vscode is
newAnt.adiun commentedon Feb 8, 2018
I'm hitting this too, right after I upgraded to the latest VSCode 1.20.0. Previously I had vscode-python 2018.1.0. This issue did not happen with vscode-python 2018.1.0 and the previous version of VSCode.
My previous pythonPath was: "${workspaceRoot}/.virtualenv/bin/python". I am using .virtualenv as a symlink to a virtualenv in my user dir, managed by virtualenvwrapper. But even if I don't use a symlink, and have the entire virtualenv in my workspace folder with the python path pointing to it, it doesn't work.
Note: I'm not sure if this is related, but in at least VSCode 1.20.0, it looks like workspaceRoot support has been deprecated in favor of workspaceFolder. I didn't even realize that the workspaceRoot env var was deprecated. Support hasn't been dropped though, I can still use workspaceRoot in launch.json.
But even if I make pythonPath = "${workspaceFolder}/.virtualenv/bin/python" that doesn't work.
scp-r commentedon Feb 8, 2018
I got this bug after I upgraded to vscode 1.20.0, and my pythonPath is "${workspaceFolder}\venv\Scripts\python.exe".
If I change pythonPath to ".\venv\Scripts\python.exe" then everything works fine.
ksesong commentedon Feb 8, 2018
I'm having the same issue as well.
vscode 1.20.0; vscode-python 2018.1This might be related to the multi-root workspace; when I directly open the project, the setting
"python.pythonPath": "${workspaceFolder}/.venv/bin/python"works as expected, but when I switch to the multi-root workspace, it does not manage to find the environment (and I can't find it in the promptSelect Interpreter).rhummer commentedon Feb 8, 2018
Seeing this as well with
vscode 1.20.0,vscode-python 2018.1.0. I was not seeing an issue until I updated tovscode 1.20.0from1.19.3.I have my
python.pythonPathset to"${workspaceRoot}/.env/Scripts/python.exe"it did not work, changing to"${workspaceFolder}/.env/Scripts/python.exe"also did not work.As mentioned above changing to a fully qualified path or relative path,
./.env/Scripts/Python.exe, worked. Using the environment selection IO to choose the correct virtualenv also doesn't work since it auto fills it as"${workspaceFolder}/.env/Scripts/python.exe"No symlinks involved on my end.
5 remaining items
DonJayamanne commentedon Feb 9, 2018
@YMIndustries Ryan Hummer (@rhummer) Korn Seang Edouard Song (@ksesong) @Jasper0819X Adi Unnithan (@adiun) @zzylog7
I do apologize for this issue, unfortunately its an upstream issue in VS Code.
Hopefully we can get this sorted out asap.
alexandrudima I've created a new issue microsoft/vscode#43303 for this in the VS Code repo.
🐛 resolve pythonPath in debug config
DonJayamanne commentedon Feb 14, 2018
@zzylog7 Korn Seang Edouard Song (@ksesong), Adi Unnithan (@adiun), Joshua Sleeper (@joshsleeper) MetaFight Joshua Sleeper (@joshsleeper) Adi Unnithan (@adiun) @Jasper0819X Ryan Hummer (@rhummer)
The fix will be in the next release (end of this month).
Until then please use the Insiders build of this extension as it contains the fix (Note: I'm not referring to VS Code Insiders).
The instructions to download and install this insiders build of the extension can be found here, under Insiders Buid
MetaFight commentedon Feb 14, 2018
Don Jayamanne (@DonJayamanne) excellent! Thank you very much :)
arthurspa commentedon Feb 21, 2018
Don Jayamanne (@DonJayamanne) thanks, it worked!
saamkhya commentedon Apr 5, 2018
${config:python.pythonPath} seems to be NOT working inside the tasks.json file for building the task.
python.pythonPath is set to ${workspaceFolder}/venv/bin/python under Users settings.
When the command is set to ${workspaceFolder}/venv/bin/python instead of ${config:python.pythonPath}, it is working fine.
Though ${config:python.pythonPath} seems to be working fine with the launch.json for the debugger.
DonJayamanne commentedon Apr 5, 2018
saamkhya
Not sure whether
config:python.pythonPathis supported intasks.json. You'll need to create an issue in VS Code to find that out, not here.