How do you get the Code Runner extension in Visual Studio Code to use the selected Python interpreter?

喜欢而已 提交于 2020-03-18 10:02:16

问题


I'd like quickly run the active python file in vscode using the Code Runner extension.

When I run it I get the message...

Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640

I would like Code Runner to use the active vscdode Python Interpreter. How?


回答1:


This took some time to find so I thought I'd post the Q & A here for future searchers.

From this github post.

Open your settings.json file and add this setting.

"code-runner.executorMap": {
  "python":"$pythonPath $fullFileName",
}

👍



来源:https://stackoverflow.com/questions/57541747/how-do-you-get-the-code-runner-extension-in-visual-studio-code-to-use-the-select

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!