无法从终端启动 VS Code

发布于 2025-01-16 22:06:45 字数 492 浏览 4 评论 0原文

您好,我尝试使用 code . 从终端启动 VS Code,但出现错误:

/usr/local/bin/code: line 6: python: command not found
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory

此命令曾经工作正常,直到最近我更新了操作系统。 设备:MBA 13" M1 操作系统:12.3

我尝试使用 Shell Command: Install 'code' command in PATH 从 VS Code 安装 PATH

还尝试添加: export PATH="$PATH:/Applications/Visual Studio Code。 app/Contents/Resources/app/bin" 到我的 ~/.zshrc 获取它并重新启动一切。

Hello Im trying to launch VS Code from terminal using code . but getting errors:

/usr/local/bin/code: line 6: python: command not found
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory

This command used to work fine until maybe recently when I updated my OS.
Device: MBA 13" M1
OS: 12.3

Ive tried to install PATH from VS Code using Shell Command: Install 'code' command in PATH

Also tried adding: export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" to my ~/.zshrc sourced it and restarted everything.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

狂之美人 2025-01-23 22:06:45

我通过brew安装了python3,所以我只需运行

ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python

I had python3 installed through brew so I simply ran

ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文