【问题标题】:How do you get the Code Runner extension in Visual Studio Code to use the selected Python interpreter?如何在 Visual Studio Code 中获取 Code Runner 扩展以使用选定的 Python 解释器?
【发布时间】:2019-12-23 18:55:18
【问题描述】:

我想使用 Code Runner 扩展名在 vscode 中快速运行活动的 python 文件。

当我运行它时,我会收到消息...

未找到 Python,但可以从 Microsoft Store 安装:https://go.microsoft.com/fwlink?linkID=2082640

我希望 Code Runner 使用活动的 vscdode Python 解释器。怎么样?

【问题讨论】:

    标签: python coderunner vscode-code-runner


    【解决方案1】:

    这需要一些时间才能找到,所以我想我会在这里发布问答以供未来的搜索者使用。

    来自this github post
    打开您的 settings.json 文件并添加此设置。

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

    ?

    【讨论】:

    • 谢谢你,我不明白为什么VSCODE一切都那么复杂
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-01
    • 2020-02-16
    • 1970-01-01
    • 2021-11-22
    • 2022-01-13
    相关资源
    最近更新 更多