![如何将 Python3 设置为 VScode 的默认 Python 解释器?](https://linux22.com/image/907451/%E5%A6%82%E4%BD%95%E5%B0%86%20Python3%20%E8%AE%BE%E7%BD%AE%E4%B8%BA%20VScode%20%E7%9A%84%E9%BB%98%E8%AE%A4%20Python%20%E8%A7%A3%E9%87%8A%E5%99%A8%EF%BC%9F.png)
我已经成功安装了 VSCode 和 Python 扩展。由于 Ubuntu 附带两个 Python2 版本2.7.12
和 Python3 版本3.5.2
,因此 VSCode 使用 Python2 作为默认解释器。打开 VSCode 后,我使用命令Ctrl + Shift + P
更改首选项,然后输入 Python Interpreter 并从下拉列表中选择 Python3,但出现以下错误。
Failed to set 'pythonPath'. Error: Permission denied writing to file (file:///home/.vscode/settings.json)
Source:Python (Extension)
我如何访问 setting.json 文件并编辑它以将解释器更改为 Python3?