【问题标题】:Atom platformio won't run pythonAtom platformio 不会运行 python
【发布时间】:2018-05-18 21:04:30
【问题描述】:

我无法将 atom 设置为 IDE。 platformio-ide-terminal 包不会运行 python。我有一个名为 myfile.py 的简单文件,它打印一个句子。我的工作目录位于我为使用 atom 的课程创建的素材中的文档中。我在 atom 的命令行中收到以下错误消息:

PS C:\Users\Angus\Documents\UdemyPython_10Apps\Beyond_Basics> python3 myfile.pypython3 : The term 'python3' is not recognized as the name of a cmdlet, function, script file, oroperable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

在 line:1 char:1 + python3 myfile.py3 + ~~~~~~~ + CategoryInfo : ObjectNotFound: (python3:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

【问题讨论】:

  • 如果你输入:'which python3',你会得到什么?
  • 你为什么在终端运行python?为什么不直接从编辑器窗口执行它。
  • 我刚刚在 Atom 中运行了一个测试。我打开了一个示例 python 文件。从编辑器窗口中,我运行了我的代码,它运行良好。然后我通过选择 platformio-idt-terminal 包打开了一个终端窗口。这打开了编辑器窗口正下方的终端窗口。在这个终端窗口中,我输入: python myfile.py 该文件再次执行完成。
  • 不尴尬!只是混淆了正确的别名。很高兴你修好了!
  • 您可能想回答自己的问题,接受您的回答并获得分数。

标签: command-line atom-editor platformio


【解决方案1】:

一些 Windows 终端接受 py -3 而不是 python3 作为正确的别名,即打开和运行 python 程序的命令。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多