Home >Backend Development >Python Tutorial >How to install the python interpreter

How to install the python interpreter

藏色散人
藏色散人Original
2019-06-29 11:26:586803browse

How to install the python interpreter

How to install the python interpreter?

Python is a powerful language that currently supports all mainstream operating systems. It comes with a Python environment on Linux, Unix, and Mac systems. In Windows10You need to install it on the system, it’s super simple

Python interpreter installation method steps:

1. Open the official website https://www.python.org/downloads/windows/ Download Center

2. After downloading, open it for installation, check (all users), and then click (customize installation) to customize the installation,

3. After entering this interface, these are some optional items, all of which are checked by default to proceed to the next step,

3. This interface is to select the installation path. It is best to create a new path yourself for easy search and check the option Default

4. After completing the above steps, start the installation

5. After the installation is complete, set the environment variables. Control Panel ==》 System and Security ==》 System ==》 Advanced system settings ==》 Environment variables ==》 Find path in the system variables and double-click ==》 New path Python interpreter and script

6. To achieve coexistence of multiple versions, similarly, version 3.6 was installed before Install another version 2.7 interpreter,

7. Note: You are not finished after writing this. In python36, find the python.exe file from the file directory, copy it and rename it to python36.exe. Similarly, find python in python2. Copy the exe and rename it to python2.exe

The purpose of writing this is that it will not always be python3 when parsing system variables, because when you enter python on the cmd command line, in The python interpreter of the first command line will be entered by default in the system variables. Whether you enter python2 or python3, it will be the first python found by default in the system variables. Of course, there is one thing to note, that is, don’t Change the name of the python.exe file, copy and rename, copy and rename, copy and rename (say important things three times), don’t ask why, try it yourself if you don’t believe me, I lose if you don’t reinstall the system. . .

8. Okay, these are the steps to install the python interpreter. Congratulations on entering the pit. Remember to enter it on the cmd command line print ("Hello World")

Related recommendations: "Python Tutorial"

The above is the detailed content of How to install the 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
Previous article:What type is python set?Next article:What type is python set?