创建python venv环境
py -3 -m venv coursevenv
安装python插件
vscode配置python环境
vscode安装插件
vscode setting
参考下面内容,完成 虚拟环境和自动补充及提示的配置
{
"workbench.colorTheme": "Default Light+",
"window.zoomLevel": 0,
"python.pythonPath": "g:\\PythonProject\\coursevenv\\Scripts\\python.exe",
"editor.formatOnSave": true,
"python.linting.pycodestyleEnabled": true,
"python.linting.pylintPath": "pylint",
"python.linting.pylintArgs": [
"--load-plugins"
],
"python.linting.pylintEnabled": true,
"python.linting.pycodestyleArgs": [
"--ignore=E501"
],
"python.jediEnabled": false,
"files.exclude": {
"**/*.pyc": true
},
"python.languageServer": "Jedi",
"[python]": {},
"workbench.editorAssociations": [
{
"viewType": "jupyter.notebook.ipynb",
"filenamePattern": "*.ipynb"
}
],
"python.venvFolders": [
"G:\\PythonProject\\coursevenv"
],
"python.autoComplete.extraPaths": [
"G:\\PythonProject\\coursevenv\\Scripts",
"G:\\PythonProject\\coursevenv\\Lib\\site-packages"
],
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"files.autoSave": "afterDelay"
}