Home > Development Tools > VSCode > body text

Install and use Python plug-in in VSCode

青灯夜游
Release: 2020-12-18 17:59:57
forward
11707 people have browsed it

This article will introduce to you the use of Python plug-ins under VSCode. 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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!