Solution to the problem that Python cannot open the .py file: First enter the directory of the py file that needs to be opened, open the command menu; then select [Open command window here] in the command menu, and enter the python file name ;Finally type Enter.
The operating environment of this tutorial: Windows 7 system, python version 3.9, DELL G3 computer.
Solution to the problem that Python cannot open the .py file:
1. Enter the directory of the py file that needs to be opened:
2. Press the Ctrl key and right-click the mouse to open the command menu:
3. Select [Open command window here] in the command menu:
4. Enter the python filename.py command in the open command line window:
5. Type Enter, You can open the executable py file and the results are as follows:
Related free learning recommendations: python video tutorial
The above is the detailed content of What to do if Python cannot open the .py file. For more information, please follow other related articles on the PHP Chinese website!