I am trying to get Code Runner to work on VS code on my Windows computer (although I use WSL most of my work involving Python). I have installed Python using Anaconda
C:\\Users\\FirstName LastName\\anaconda3\\python.exe
You might notice the whitespace in the file path.
And I have added it to my settings.json
...
{
"terminal.integrated.inheritEnv": false,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.dataScience.sendSelectionToInteractiveWindow": true,
"code-runner.executorMap": {
"python": "C:\\Users\\FirstName LastName\\anaconda3\\python.exe",
},
"python.autoComplete.extraPaths": [
]
}
... and yet I keep getting this error when I run a Python script using Code Runner:
[Running] C:\Users\FirstName LastName\anaconda3\python.exe "c:\Users\FirstName LastName\Documents\PythonFolder\pythonscript.py"
'C:\Users\FirstName' is not recognized as an internal or external command,
operable program or batch file.
Looks like it's not happy with the whitespace there. I checked out a solution proposed in another question, whichw as to add "python": "python"
to settings.json
, but that just gave me this:
'python' is not recognized as an internal or external command,
operable program or batch file.
How can I make this work?