【问题标题】:VS returns this when I try to run python /bin/sh: python: command not found (macOS Ventura 13.0.01)当我尝试运行 python /bin/sh 时,VS 返回这个:python: command not found (macOS Ventura 13.0.01)
【发布时间】:2023-01-09 01:33:35
【问题描述】:

我已经将 python 作为 VS 代码的附加组件安装。我还从浏览器下载了 python,所以我应该拥有它。读到这可能是因为代码运行器或错误的路径。

我运行的操作系统是 Ventura 13.0.01

如果我在 VS 中按下运行按钮右侧的向下箭头,它会在“终端”选项卡下返回我的代码。在此之前我只用过 JS,所以我真的不知道 Python 代码应该如何运行。 我已经尝试过早期的答案,这些答案都指向了 Python 的路径方向,但并没有那么理解。

【问题讨论】:

    标签: python macos


    【解决方案1】:

    如果您的代码在单个文件中

    python /path/to/python_file.py
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-29
      • 1970-01-01
      • 2020-11-05
      • 2020-01-28
      • 2022-12-21
      • 2022-12-23
      • 2020-08-14
      • 2020-09-26
      相关资源
      最近更新 更多