How to execute the py file
1. First, copy the path where the py file is stored in the resource manager, and press the Windows key + r. Enter cmd in run and press Enter to open the command line:
#2. In the command line, first switch to the path of the py file, and then enter "python file name. py "Run the python file:
Recommended learning: Python video tutorial
3. Press the Enter key and you can see The py file in the window starts to run. Note that when running the py file on the command line, you must add the python installation path to the environment variable path, otherwise an error will be reported and the command cannot be found. At this point, the operation of running the file in python is completed:
The above is the detailed content of How to execute py file. For more information, please follow other related articles on the PHP Chinese website!