Home>Article>Development Tools> Install and use Python plug-in in VSCode
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.
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.
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
After the installation is completed:
3. Install the Chinese plug-in:
Close and open again: the interface displays Chinese
4. Open a file path:
Click directly to add the file and write the file suffix name.py
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:
6. A prompt will appear in the lower right corner:
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:
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!