Home  >  Article  >  Backend Development  >  How to install python interpreter

How to install python interpreter

silencement
silencementOriginal
2019-05-20 15:43:4714870browse

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.

How to install python interpreter

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:

How to install python interpreter

2. Run Python

After the installation is successful, open the command prompt window and type python. Two situations will appear:

Situation 1:

How to install python interpreter

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:

How to install python interpreter

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn