"configurations": [{
"name": "g",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/youtube_dl",
"console": "integratedTerminal",
"args": ["-F", "https://www.ya.com/renwenjp/221727/"],
"python": "/usr/bin/python3"
}],
launch.json 里面,可以指定 VS code 的 python 工程 project 的使用 python 版本
这个是工程 scheme 级别的
也可以在工程级别设置:
.vscode 文件夹下:
settings.json 文件中:
{ "python.pythonPath": "/usr/bin/python3" }
具体的配置过程:
进入设置

选择解释器
Command + Shift + P

选择合适的路径

本文介绍如何在VSCode中配置Python项目的解释器版本,包括在launch.json文件中为特定调试配置指定版本,以及通过settings.json文件全局设定项目的Python路径。
3132

被折叠的 条评论
为什么被折叠?



