In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.