当选择“运行代码”(默认热键)时,我似乎无法让我的settings.json文件影响 python 在 VSCode 中的调用方式,我的用户如下:Ctrl + Alt + Nsettings.json
{
"python.pythonPath": "/usr/bin/python3",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.jediEnabled": true,
"editor.minimap.enabled": true,
"editor.multiCursorModifier": "ctrlCmd",
"workbench.tree.indent": 24,
"workbench.startupEditor": "untitled",
"workbench.settings.editor": "json",
"workbench.settings.openDefaultKeybindings": false,
"workbench.settings.openDefaultSettings": true,
"workbench.settings.useSplitJSON": false,
"explorer.confirmDragAndDrop": false,
"python.linting.enabled": true,
"python.languageServer": "Jedi",
}
然而,当我运行我的 python 文件而不是调试它时,它显示:
[Running] python -u "path/to/file.py"
当我期待时(正如我设定的那样python.pythonPath)settings.json:
[Running] /usr/bin/python3 -u "path/to/file.py"
为什么我的settings.json文件密钥python.pythonPath对我的代码的调用方式没有影响?
python在其他重要原因中,当我的代码是用 python 3 编写时,我的python 代码甚至没有在我的机器上运行,因为调用 python 2。
VS代码版本:
Version: 1.47.3
Commit: 91899dcef7b8110878ea59626991a18c8a6a1b3e
Date: 2020-07-23T15:51:39.791Z (1 mo ago)
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-112-generic
胡子哥哥
相关分类