VsCode Python配置安裝教程

1、軟件下載地址

Python官網: https://www.python.org/downloads/windows/

Python下載地址: https://www.python.org/ftp/python/3.7.0/python-3.7.0.exe

vscode官網: https://code.visualstudio.com/

 

2、Python安裝圖文教程

1、開始安裝

勾選Add Python 3.7 to PATH,點擊 Customize installation(自定義安裝) .

 

2、可選功能

 

Documentation:Installs the python documentation file.

文檔:安裝Python 文檔文件。

 

pip:installs pip,which can download and install other Python packages.

pip:安裝Pip,可以下載並安裝其他的Python包。

 

tcl/tk and IDLE: install tkinter and the IDLE development environment.

tcl/tk and IDLE:安裝tkinter 和IDLE開發環境

 

Python test suite: installs the standard library test suite.

Python測試套件:安裝標準庫測試套件。

 

py launcher: install the global py launche to make it easier to start python.

py 啓動器:安裝全局的啓動可以更方便的啓動python。

 

 

 

3、高級選項

1、Install for all users

爲所有用戶安裝

 

2、Associate files with Python(requires the py launcher)

關聯Python文件(需要安裝py launcher)。

 

3、Create Shortcus for installed applications.

創建快捷方式。

 

4、Add Python to environment variales

將Python添加到環境變量中

 

5、Precompile Standard library

預編譯標準庫

 

6、Download debugging Symbols

下載調試符號

 

7、Download debug binaries(requires vs 2015 for later)

下載調試二進制文件,需要vs2015及更高版本。

 

8、Customize Install location

自定義安裝路徑

 

 

4、開始安裝

 

5、安裝成功

 

 

 

6、驗證計算機是否安裝Python

    使用Win+R 打開運行,輸入Cmd 打開Cmd運行窗口。輸入Python後,回車顯示當前計算機的Python版本。

 

3、配置vscode.

1、新建文件保存爲".py"文件。

新建文件,保存爲python文件。保存後,會提示如下:需要安裝Pylint。直接點擊 Install 進行安裝即可。

 

 

2、安裝進度

 

 

 

3、打開文件夾

進行配置前,需要打開文件夾。所謂打開文件夾就是選擇一個文件路徑即可:用於保存Python文件。

 

4、配置launch.json

這一步主要是配置調試的,打開launch.json:調試 >> 打開配置 

修改 pythonpath 詞條:

 

 

5、配置tasks.json

任務-->配置任務

這一步主要是配置任務的,通常對於小的文件可以直接使用快捷鍵執行python腳本。 配置完成後,可以直接在下方的【終端】處顯示Python運行結果

 

 

 

 

6、在終端中運行Python文件

在Python文件中右鍵,會顯示【在終端中運行Python文件】的菜單.

 

文檔下載地址: 鏈接: https://pan.baidu.com/s/1KlVG_ECJjKycysXe98WlCg 密碼: 9x74

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章