how to run the. py file with the Python interpreter1. We are learning Python, mainly in the python3.6 shell to learn the Python syntax, as shown in Figure 1.1
Figure 1.1 Python Shell
2. In the interpreter installation, we choose the location of the installation, the last 2.1
Figure 2.1
3. Add it to path, step: Click this computer, properties, advanced system settings, environment variables, and then you can see a user variable and system variables (generally a computer on a user, you use, set user variables can be) 3.1
Figure 3.1
In the "JVLUNL User Variables" field click on the path to edit, then click New, the main new two, one is your Python installation directory, such as C:\jvunl\python3.6\ (this is my installation location), but also to add C:\jvunl\python3.6 \scripts\ (this is mostly with the PIP inside) 3.2
Figure 3.2
4. Now open our console and find the location in c:\user\jvunl> the essence of adding an environment variable is to link the Python installation location to C:\USER\JVUNL so that you can run it directly in that directory Python.exe (including Pip3.exe) Figure 4.1 4.2
5. To run the. py file, first our. py file must be built in the console under the directory, C:\USERS\JVLUNL, we can build a shortcut on the desktop, set up a good. py file on the inside console when you run Python, you can find it. Run and get the results. As shown in Figure 5.1
Figure 5.1
WIN10 installs the python3.6 and how to run the. py file through the Python interpreter.