First, enter cmd in the "Start" menu, then right-click and select Run as Administrator, which will open a command prompt window.
Then enter python and press Enter. If the python prompt (>>>) appears, it means it has been installed. If it prompts "python is not an internal or external command, operable program or batch file." (as shown below), it means python is not installed.
First, enter https://www.python.org/downloads/ and the current versions are python3.6.3 and python2.7.14 respectively. Click the python3.6.3 button to download.
Note that when installing, be sure to select Add Python to PATH. This makes it easier for us to configure the system (as shown below)
After the installation is successful, we open the command prompt window, enter python, and then the output is as shown in the figure below, which means that Windows has found the Python version just installed.
Whenever we run a python code snippet, we need to open a command prompt and then start a python session. When we need to close the session, we can press Ctrl Z or press the Enter key and then execute the command" exit".
The above is the detailed content of How to install python under windows10?. For more information, please follow other related articles on the PHP Chinese website!