# Visual studio code set the python environment URL: https://chengjinfang.com/posts/2017/install-vc/ Author: 程锦方 Date: 2017-03-24 Tags: #note #python #install Summary: visual studio code 设置python环境 1、安装插件 ctrl+shift+x 在输入框输入python下载需要的插件 2、设置python运行 在 Visual Studio Code 中运行 Python 代码需要修改 task.json 配置代码 2.1、ctrl+shift+e点击打开文件夹 ------------------------------------------------------------------------ ## visual studio code 设置python环境 ### 1、安装插件 ##### ctrl+shift+x #### 在输入框输入python下载需要的插件 ### 2、设置python运行 #### 在 Visual Studio Code 中运行 Python 代码需要修改 task.json 配置代码 #### 2.1、ctrl+shift+e点击打开文件夹或新建一个文件夹 #### 2.2、按f1 输入task选择第一个配置任务和设置运行 #### 2.3、修改内容: ```json { “version”: “0.1.0”, “command”: “python”, “isShellCommand”: true, “args”: [“${file}”], “showOutput”: “always” } ``` ### 3、运行python ##### 使用Ctrl + Shift + b运行 ##### 第一次运行时如果底栏不显示运行结果请注意上面的提示直接点安装。 ------------------------------------------------------------------------ Site: https://chengjinfang.com/ · All Index: https://chengjinfang.com/all/ · RSS: https://chengjinfang.com/rss.xml