Home>Article>Development Tools> Install and use Python plug-in in VSCode

Install and use Python plug-in in VSCode

青灯夜游
青灯夜游 forward
2020-12-18 17:59:57 11677browse

This article will introduce to you the use of Python plug-ins underVSCode. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Install and use Python plug-in in VSCode

Related recommendations: "vscode Basic Usage Tutorial"

under Visual Studio Code Python plug-in usage

1. Install python3.7 (download and install python-3.7.5-amd64 from the official website). Select Add path during installation. After installation, execute the cmd command python and you can see the python version. , indicating that the installation is successful and the path is added normally.
Install and use Python plug-in in VSCode
2. Download VSCodeUserSetup-x64-1.46.0 from the official website, the installation is complete, click to open, search for python in the application area, and click install

Install and use Python plug-in in VSCodeAfter the installation is completed:
Install and use Python plug-in in VSCode
3. Install the Chinese plug-in:
Install and use Python plug-in in VSCode
Close and open again: the interface displays Chinese
Install and use Python plug-in in VSCode
4. Open a file path:
Install and use Python plug-in in VSCode
Click directly to add the file and write the file suffix name.py
Install and use Python plug-in in VSCode
Since Vscode is not an application for python like pycharm, the new file will not have its own suffix name. It is recommended Written manually.
There is also a method to set the file type. After setting, it can default to py file.
5. Run the file: Double-click F5, the running result will be:
Install and use Python plug-in in VSCode
6. A prompt will appear in the lower right corner:
Install and use Python plug-in in VSCode
Select install to install
7. The code will automatically Formatting tool yapf:
Alt Shift F. For the first time, a prompt to install yapf will appear in the lower right corner. Click yes or install
and then use Alt Shift F
. The code that was originally connected together and has no blank lines will automatically wrap. , Section:
Install and use Python plug-in in VSCode

For more programming-related knowledge, please visit:Introduction to Programming! !

The above is the detailed content of Install and use Python plug-in in VSCode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete