VSCODE+Python下载与环境搭建(简化版)

以Python3.64为例,Python2.x略有不同

Python下载/安装:

1、官网下载VSCODE: https://code.visualstudio.com/

2、官网下载Pyhon: https://www.python.org/downloads/

    64位系统选择:Windows x86-64 executable installer即可

3、下载完后,勾选Add to Path, 同时最好选择自定义位置,以免默认路径出现中文。

    安装成功后,系统Path应该有两个Python的Path,分别为python、python\Scripts的Path.

    同时,cmd中分别直接运行Python与Pip应该都能被识别。

4、安装格式检查模块:Pip Install flake8 




5、VSCODE安装扩展(Ctrl+Shift+X)选择扩展名为:Python

6、VSCODE中进行基本的配置:文件(F)->首选项(P)->设置(S)中进行覆盖性设置

// Path to Python, you can use a custom version of Python by modifying this setting to include the full path.

"python.pythonPath": "C:/Python36/python",

//while to lint Python files using flake8

"python.linting.flake8Enabled": true,

//Provider for formating

"python.formatting.provider": "yapf",

"editor.renderIndentGuides": false,

"editor.accessibilitySupport": "on"
其中pythonPath填写刚才Python安装的目录



你可能感兴趣的:(Python)