且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

VS Code 中的运行按钮不显示 [Python]

更新时间:2022-04-21 00:03:51

这里有两个选择:

  • 安装适用于 Visual Studio Code 的 Microsoft Python 扩展适用于 Visual Studio Code 的 Microsoft Jupyter 扩展

在 Microsoft Visual Studio Code 的扩展中搜索 Python:Marketplace 并点击安装.

Search for Python in Microsoft Visual Studio Code's Extension: Marketplace and hit on install.

在 Microsoft Visual Studio Code 的扩展:Marketplace 中搜索 Jupyter 并点击安装.

Search for Jupyter in Microsoft Visual Studio Code's Extension: Marketplace and hit on install.

或者您可以使用终端或命令提示符来安装它们.打开终端或命令提示符并在那里写下这些命令.

Or you can use your terminal or command prompt to install them. Open the terminal or command prompt and write these commands there.

安装 Microsoft Python 扩展,

Install Microsoft Python extension,

code --install-extension ms-python.python

安装 Microsoft Jupyter 扩展,

Install Microsoft Jupyter extension ,

code --install-extension ms-toolsai.jupyter

  • 为 Visual Studio Code 安装 Code Runner
  • 在 Microsoft Visual Studio Code 的扩展:Marketplace 中搜索 Code Runner 并点击安装.

    Search for Code Runner in Microsoft Visual Studio Code's Extension: Marketplace and hit on install.

    或者您可以使用终端或命令提示符来安装它.打开终端并写入命令.

    Or you can use your terminal or command prompt to install it. Open the terminal and write the command.

    安装代码运行器,

code --install-extension formulahendry.code-runner

您必须使用 Microsoft 的第一个选项.如果您同时使用这两个选项,则安装 Code RunnerMicrosoft PythonJupyter 扩展,然后安装 Microsoft Python仅当您禁用 Code Runner 时,扩展程序才会起作用.

You must go with the first option by Microsoft. If you go with both the options, you install Code Runner and Microsoft Python and Jupyter extensions then the Microsoft Python extension will only work if you disable Code Runner.

Code RunnerC、C++、Java、Javascript、Perl 等的良好扩展,但适用于 Python Microsoft Python 和 Jupyter 扩展是***的.

Code Runner is a good extension for C, C++, Java, Javascript, Perl, ... but for Python Microsoft Python and Jupyter extension is the best.