一、VScode下载
官网
Download Visual Studio Code - Mac, Linux, Windows

点击64 bit会跳转到下载页面

把框中的内容替换成下面的
vscode.cdn.azure.cn?就会弹出一个新的下载,速度变快

安装过程就是直接下一步
下载python插件

按下ctrl+shift+p在搜索框中搜索
python:Select Interpreter

点击后会弹出一个新增环境变量,点击?

配置setting.json文件

?可以根据需要配置setting.json文件
{
"editor.fontSize": 15,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"window.zoomLevel": 1,
"python.analysis.indexing": true,
"python.languageServer": "Pylance",
"python.analysis.extraPaths": [
"C:\\Users\\176738",
"C:\\Users\\176738\\AppData\\Local\\Programs\\Python\\Python39\\DLLs",
"C:\\Users\\176738\\AppData\\Local\\Programs\\Python\\Python39lib",
"C:\\Users\\176738\\AppData\\Local\\Programs\\Python\\Python39",
"C:\\Users\\176738\\AppData\\Local\\Programs\\Python\\Python39\\Lib\\site-packages",
],
"terminal.integrated.env.windows": {
"PYTHONPATH": "${workspaceFolder};${env:PYTHONPATH}"
},
"editor.unicodeHighlight.invisibleCharacters": false,
"editor.renderWhitespace": "all",
"workbench.editorAssociations": {
"*.db": "default"
},
"redhat.telemetry.enabled": true,
"security.workspace.trust.untrustedFiles": "open"
}
完成python环境的配置
|