I've installed Python 3.10.5 on my Windows 10 machine. Works splendidly running a file by writing "python file.py". What I can't do though, is to get the extension code runner to run python files through the hotkey ctrl + b. I've reinstalled Python (made sure to check PATH). Rebooted the computer and reinstalled code runner.
If I change no settings I get this error:
"/usr/bin/python3: The term '/usr/bin/python3' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
I found this similar thread: Code Runner does not work for Python in VsCode
After changing the code in settings.json to
"code-runner.executorMap": {
"python": "\"$pythonPath\" $fullFileName",
}
I get the error:
1 | … Data\Local\Programs\Python\Python310\python.exe" "c:\lekspel\test.py" | ~~~~~~~~~~~~~~~~~~~~ | Unexpected token '"c:\lekspel\test.py"' in expression or statement.
adding in a "-u" returns this error:
Unexpected token '-u' in expression or statement.
Anyone got a clue how to sort this out?