1. Install python
Official website download address: https://www.python.org/ftp/python/3.8.0/python-3.8.0-amd64.exe
Double-click to open the .exe file,
check the Add Python 3.8 to Path option, and then click install now can be installed.
installing:
After the installation is complete, click close.
2. Test
Press win+r on the keyboard, enter cmd in the run window in the lower left corner, and press Enter.
Type python in the pop-up window and press Enter. Get the following display.
Enter 1+1 after the prompt >>> and press Enter to display 2.
Successful installation.
3. Install VScode
Official website download address: https://code.visualstudio.com
Find the downloaded installation package, double-click to open it, and keep clicking Next.
4. Set VScode
Open the installed VScode, you can first set up the Chinese interface and solve the problem of garbled Chinese comments. For detailed steps, see the previous blog: https://blog.csdn.net/weixin_43737995/article/details/104214032?spm=1001.2014.3001.5502
Follow the steps below to search and install.
Add a python folder ready to store the code.
Open the settings.
Enter the following code in settings.json to configure flake8 and yapf and close the pylint tool.
{
"python.linting.flake8Enabled": true,
"python.formatting.provider": "yapf",
"python.linting.flake8Args": ["--max-line-length=248"],
"python.linting.pylintEnabled": false
}
Save and close.
5. Test
Create a new python file under the selected folder, ending with .py.
Enter the code to test in the file:
print('hello world')
Run it and see the results.
If the output is normal, the installation is complete.