


How to develop Python with VSCode? Introduction to development environment configuration
VSCodeHow to develop in Python? This article will introduce to you how to configure the Python development environment in VSCode.
#First of all, please make sure that the installation of VsCode and the configuration and installation of the Python environment have been completed! [Recommended learning: "vscode tutorial"]
First enter the extended search, enter "python" to search, click on the python plug-in as shown in the picture to install and restart VsCode.
Check whether Python is installed successfully:
- Open the command prompt
- Enter python press enter
- Enter pip list to check whether the third-party package is correct
Install the third-party package:
- Open the command prompt Symbol
- Enter pip install flake8
- Enter pip install yapf
- These two packages will be used when configuring the Python environment of VScode
1. Create a new project
Create a new file test.py
2. Configure the work area (configure flake8 and yapf and close the pylint tool)
##Configure the following code:
{ "python.linting.flake8Enabled": true, "python.formatting.provider": "yapf", "python.linting.flake8Args": [ "--max--line-length=248" ], "python.linting.pylintEnabled": false }
3. Configure Python compilation settings
- Click Debug on the left, select Add configuration, java, python will pop up, select Python will pop up the launch.json file
##Add the following configuration (so you don’t need to press it twice when compiling F5), if you want to debug step by step, just change false to true "stopOnEntry":false,
Complete The above configuration does not allow us to debug and run the code in VScode
- Because we have not configured the Python path in VScode
- Open launch.json and enter it under the debugger used during debugging "pythonPath": Target path
"pythonPath": "你的pytho.exe所在的路径",
To complete this step, you can Get the running results of the program directly through shortcut keys
- Click on Terminal, select Configure Default Build Task, and open the task.json file
-
Modify the following configuration "group":{ "kind":"build", "isDefault":true }
- File - > Preferences -> Settings -> open setting.json
-
##Add configuration in User Setting.json:
{ "workbench.startupEditor": "newUntitledFile", "python.pythonPath": "你的python.exe路径", "python.linting.enabled": false, "editor.fontSize": 14 }
''' @name: Sunny Chen @test: test font @msg: 这是由Sunny Chen创建. @param: @return: ''' list_a=[1,2] list_b=[5,6] ref_list_a=id(list_a) for i in range(1,6): for j in range(1,6): print(str(j)+"\n") print(str(i)+"\n")For more programming-related knowledge, please visit: Introduction to Programming! !
The above is the detailed content of How to develop Python with VSCode? Introduction to development environment configuration. For more information, please follow other related articles on the PHP Chinese website!

The difference between VisualStudioProfessional and Enterprise is in the functionality and target user groups. The Professional version is suitable for professional developers and provides functions such as code analysis; the Enterprise version is for large teams and has added advanced tools such as test management.

VisualStudio is suitable for large projects, VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive IDE functions, supports multiple languages, integrated debugging and testing tools. 2.VSCode is a lightweight editor that supports multiple languages through extension, has a simple interface and fast startup.

VisualStudio is a powerful IDE developed by Microsoft, supporting multiple programming languages and platforms. Its core advantages include: 1. Intelligent code prompts and debugging functions, 2. Integrated development, debugging, testing and version control, 3. Extended functions through plug-ins, 4. Provide performance optimization and best practice tools to help developers improve efficiency and code quality.

The differences in pricing, licensing and availability of VisualStudio and VSCode are as follows: 1. Pricing: VSCode is completely free, while VisualStudio offers free community and paid enterprise versions. 2. License: VSCode uses a flexible MIT license, and the license of VisualStudio varies according to the version. 3. Usability: VSCode is supported across platforms, while VisualStudio performs best on Windows.

VisualStudio supports the entire process from code writing to production deployment. 1) Code writing: Provides intelligent code completion and reconstruction functions. 2) Debugging and testing: Integrate powerful debugging tools and unit testing framework. 3) Version control: seamlessly integrate with Git to simplify code management. 4) Deployment and Release: Supports multiple deployment options to simplify the application release process.

VisualStudio offers three license types: Community, Professional and Enterprise. The Community Edition is free, suitable for individual developers and small teams; the Professional Edition is annually subscribed, suitable for professional developers who need more functions; the Enterprise Edition is the highest price, suitable for large teams and enterprises. When selecting a license, project size, budget and teamwork needs should be considered.

VisualStudio is suitable for large-scale project development, while VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive development tools, such as integrated debugger, version control and testing tools. 2.VSCode is known for its scalability, cross-platform and fast launch, and is suitable for fast editing and small project development.

VisualStudio is suitable for large projects and Windows development, while VSCode is suitable for cross-platform and small projects. 1. VisualStudio provides a full-featured IDE, supports .NET framework and powerful debugging tools. 2.VSCode is a lightweight editor that emphasizes flexibility and extensibility, and is suitable for various development scenarios.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
