【问题标题】:Brought a new macbook, keep getting "bin/sh: python: command not found [Done] exited with code=127" when trying to run python code带来了一个新的 macbook,在尝试运行 python 代码时不断出现 \"bin/sh: python: command not found [Done] exited with code=127\"
【发布时间】:2022-12-23 22:16:52
【问题描述】:

我正在使用 visual code studio

而且我不断收到此错误:

bin/sh: python: command not found

[Done] exited with code=127

我该如何解决?

先感谢您

我已经重新安装了 python 和可视化代码,并安装了自制软件。

我认为这是关于 python 在正确路径中“运行”代码的位置的错误

【问题讨论】:

  • 你的设置是什么,json

标签: python


【解决方案1】:

检查你的 settings.json 是

"python.pythonPath": "python3",
"code-runner.executorMap": {
    "python": "/usr/bin/python3"
}

不是

"python.pythonPath": "python3",
"code-runner.executorMap": {
    "python3": "/usr/bin/python3"
}

检查here

【讨论】:

    猜你喜欢
    • 2023-01-09
    • 2020-09-26
    • 1970-01-01
    • 2015-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-29
    • 1970-01-01
    相关资源
    最近更新 更多