Home >Backend Development >Python Tutorial >How to install python interpreter
Python currently supports all mainstream operating systems. It comes with a Python environment on Linux, Unix, and Mac systems. It needs to be installed on Windows systems. It is super simple.
1. Download python
First, according to your Windows version (64-bit or 32-bit) from the official website of Python Download the 64-bit installer or 32-bit installer corresponding to Python 3.7 (students with slow Internet speed, please move to the domestic mirror), and then run the downloaded EXE installation package:
2. Run Python
After the installation is successful, open the command prompt window and type python. Two situations will appear:
Situation 1:
Seeing the above screen means that Python is installed successfully!
When you see the prompt >>>, it means that we are already in the Python interactive environment. You can enter any Python code, and you will get the execution result immediately after pressing Enter. Now, enter exit() and press Enter to exit the Python interactive environment (you can also close the command line window directly).
Situation 2: Get an error:
This is because Windows will search for python.exe based on the path set by a Path environment variable. If If it is not found, an error will be reported. If you missed checking Add Python 3.7 to PATH during installation, you need to manually add the path where python.exe is located to Path.
If you don’t know how to modify the environment variables, it is recommended to re-run the Python installation program, and be sure to check Add Python 3.7 to PATH.
Related learning recommendations: python tutorial
The above is the detailed content of How to install python interpreter. For more information, please follow other related articles on the PHP Chinese website!