0

I installed Code Runner extension in VS Code. In my settings.json I have set "python.pythonPath": "python" option and python is in my Win10 PATH variable.

In code-runner.executorMap option in settings.json python is set by "python": "python.pythonPath". However, when I run my script with Ctrl+Alt+N I get

'python.pythonPath' is not recognized as an internal or external command,
operable program or batch file.

If I set in code-runner.executorMap python option to absolute path like "C:\\Program Files (x86)\\Python36-32\\python.exe" I get complaining about whitespaces

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Only the first word is taken, until the first whitespace occur. If I put \ to escape whitespace I get JSON error.

0

I found how to do it. Simple, in settings.json in "code-runner.executorMap" under python option put

"python": "python"

and now it searches python in Win10 PATH and runs by clicking run icon or ctrl-alt-N.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.