Before we formally start learning python, we need to configure the Python environment First.
Python
Python can be downloaded from the Python official website, Selecting the version that is appropriate for your operating System. After the download is complete, run the downloaded executable to install it.
Windows
1. Go to the download page on the official Python website Above.
2. Select a version to download (recommend the latest version, currently 3.6.1), go to the following page.
3. Select Windows x86-64 executable installer and download and download the file as Python-3.6.1-amd64.exe.
4. Run The. exe, and note that "Add Python 3.x to PATH" is Checked.
5. Click Install Now and wait for the installation to Complete.
Now open the command line, enter "python", if the following interface appears, you have succeeded!
If you are prompted with an error, the Add Python 3.x to path should not be checked at the time of installation, it can be uninstalled and reinstalled, or the folder where Python.exe is located should be manually added to the PATH environment Variable.
The Python command line is often used in the future when we write simple Python code.
Python interpreter
Python source code files have A. py extension, and a Python interpreter is required to run the Python source Code. When you install python, the CPython interpreter is installed Automatically. Apart from cpython, there are several other interpreters, not to Elaborate.
Python Editor
When you write a python program, you may want to highlight your Code. This requires a text editor, a text editor with sublime text, notepad++, Visual studio, and so On. You can even use Notepad directly, but there is no code highlighting.
Python tutorial (1)--configuring the python environment