目錄
1. 官網下載Python
2. 安裝Python
3. 檢查python安裝是否成功
4. VSCode安裝
5. VSCode安裝python插件
6. VSCode創建py文件
官網地址:Download Python | Python.orghttps://www.python.org/downloads/
embeddableis to unzip the installation;executable是window常用exe安裝;webYes Yes Download necessary files for installation during installation.
點擊【close】Close conversation cross.
搜索【運行】或【WIN+R,輸入cmd】進入cmd命令窗口,在命令行輸入【python --version】或【python】顯示如下表示安裝成功.
If the command line is not displayed as above,Just manually add environment variables.右鍵【我的電腦】,點擊【屬性】,選擇【高級系統設置】,點擊【環境變量】,在系統變量中找到【path】,點擊【新建】,輸入安裝路徑.
重新打開cmd命令窗口,Follow the steps above to viewpython是否安裝成功.
If you have multiple versions on your computerPython,The default is that the environment variable is the previous version.There are two versions of this local computer,如下,上面的是V3.8.5,下面是V2.7,respectively on top,The command line shows a different version
VSCode下載地址:Visual Studio Code - Code Editing. Redefinedhttps://code.visualstudio.com/
點擊下載window版本的vscode,安裝vscode.Because this machine is already installedvscode,Please refer to this section:
VSCode詳細安裝教程 - 知乎 (zhihu.com)https://zhuanlan.zhihu.com/p/264785441
Click the extension icon on the left,在搜索框中輸入python,Click Install in the bottom right corner of the first one,The installation The installation process will show that the installation is in progress.
顯示如下界面表示安裝成功.
按【CTRL+SHIFT+P】選擇Python解釋器,在彈出的輸入框中輸入【python :select interpreter】
Choose the path to the interpreter and you're done.
在【資源管理器】界面點擊【打開文件夾】,Select the created file directory.
Follow the steps below to add files
到這裡,windows環境下配置python+vscode環境就完成了.