In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
VSCode how to configure the Python development environment, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Check that Python is installed successfully:
Open a command prompt
Enter python to enter enter
Enter pip list to check whether the third-party package is correct
Install the third-party package:
Open a command prompt
Enter pip install flake8
Enter pip install yapf
These two packages will be used when configuring VScode's Python environment
1. Create a new project
two。 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
"stopOnEntry": false
4. Setting of environment variables
Completing the above configuration does not allow us to debug and run code in VScode
Because we haven't configured the Python path in VScode yet.
Open launch.json and type "pythonPath" under the debugger you are using when debugging: target path
"pythonPath": "the path of your pytho.exe"
5. Configure default tasks
To complete this step, you can get the running result of the program directly through the shortcut keys.
Click Terminal (terminal), select Configure Default Build Task (configure default generation task), and open the task.json file.
Modify the following configuration
"group": {"kind": "build", "isDefault": true}
6. Supplementary configuration
File-> Preferences-> Settings-> open setting.json
Add a configuration in User Setting.json:
{"workbench.startupEditor": "newUntitledFile", "python.pythonPath": "your python.exe path", "python.linting.enabled": false, "editor.fontSize": 14}
7. Save the changes, restart VScode, and open the file for debugging:
'' @ name: Sunny Chen@test: test font@msg: this is created by Sunny Chen. @ param: @ return:''list_a= [1pim2] list_b= [5Magne6] ref_list_a=id (list_a) for i in range (1Magee 6): for j in range (1pc6): print (str (j) + "\ n") print (str (I) + "\ n") does it help you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.