Python installation, environment variable configuration, eclipse configuration.
1, download the Python installation package
I am here to download the Python-2.7.13.msi, you can download the official website (https://www.python.org/downloads/release/python-2713/), you can also search the Internet directly download.
2, run the MSI file directly, follow the steps according to
Note Here, you must check "Add Python.exe to Path", or use eclipse, such as the installation of Plug-ins will be an error. Because the plug-ins such as Eclipse and other tools, need to point to the local allowed EXE file, if not click to select this option, in the installed folder can not find Python.exe.
3, configure environment variables. Add D:\python2.7.13\;D in the system variable path: \python2.7.13\scripts, the actual situation according to their own installation path to, my installation path is D disk.
This is almost ready to use, you can enter the DOS in the Python try to follow the correct. The correct display is as follows:
You can write Python files and execute them with commands in DOS.
But most of you will choose to use the visualizer, eclipse or idea, and here's how to install the Python plug-in for Eclipse.
1, choose "Help--install new software", input python, it will take the initiative to help you find the path to install.
2, follow the prompts follow the steps to go.
Because I have installed, so the screenshot is for reference only.
After installation, you can view the following:
About indentationerror:unexpected indent error, do not doubt, is definitely indentation problem. Although it looks like indentation is the same, but if the use of indentation is not the same, it will be an error. For example, you use the SPACEBAR and the TAB key to indent, even if indented, the error will be reported.
When eclipse runs a python file, it makes it easier to see errors when you modify the document format.