无法从终端启动 VS Code
您好,我尝试使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过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