简体   繁体   English

我无法运行来自 github 的微软 python 扩展代码

[英]I can not run the microsoft python extension code from github

  1. I download code from https://github.com/Microsoft/vscode-python .我从https://github.com/Microsoft/vscode-python下载代码。
  2. enter "npm i".输入“npm i”。 showing lots of red.显示很多红色。 https://i.stack.imgur.com/N0jAj.jpg https://i.stack.imgur.com/N0jAj.jpg
  3. enter "vsce package".输入“vsce 包”。 showing lots of error.显示很多错误。 https://i.stack.imgur.com/xtYfT.jpg https://i.stack.imgur.com/xtYfT.jpg
  4. I want to change some code and generate a vsix file for visual-studio-code.我想更改一些代码并为 visual-studio-code 生成一个 vsix 文件。 How can I run the code?如何运行代码?

If I recall correctly, npm is a package manager for JavaScript.如果我没记错的话,npm 是 JavaScript 的 package 管理器。

  1. First download pip and Anaconda to install and manage your Python related packages.首先下载 pip 和 Anaconda 来安装和管理您的 Python 相关包。 If you are working from a macOS machine you can use Homebrew as well.如果您在 macOS 机器上工作,您也可以使用 Homebrew。 pip Anaconda Homebrew pip Anaconda自制软件

  2. Create your virtual enviornment that contains all of the dependencies you need to run your python program.创建包含运行 python 程序所需的所有依赖项的虚拟环境。 How to create virtual enviornments如何创建虚拟环境

  3. Activate your virtual enviornment.激活您的虚拟环境。 For example, on a Windows machine do:例如,在 Windows 机器上执行以下操作:

     source activate your_enviornment_name
  4. Your Python file should be named file_name.py not.vsix.您的 Python 文件应命名为 file_name.py 而不是.vsix。

  5. If you need additional extensions within VS Code you can install those directly in the IDE by accessing the Extensions Marketplace (App Store inside Visual Studio Code)如果您需要 VS Code 中的其他扩展,您可以通过访问 Extensions Marketplace(Visual Studio Code 中的 App Store)直接在 IDE 中安装这些扩展

  6. You can edit and debug in VS Code.您可以在 VS Code 中进行编辑和调试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM