Vs代码如何在终端中创建python文件

问题描述 投票:0回答:1

我正在玩cs50p。 在第一个教程中,他们在终端中使用命令“code hello.py”,它应该创建一个文件,但我只收到错误,说 powershell 不理解命令“code”

“” code :术语“code”不被识别为 cmdlet、函数、脚本文件或可操作程序的名称。检查一下 名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。 在行:1 字符:1

  • 代码hello.py
  •   + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

“”

python visual-studio-code terminal
1个回答
0
投票

只需在终端中输入“touch hello.py”即可。

© www.soinside.com 2019 - 2024. All rights reserved.