Home >Backend Development >Python Tutorial >What to do if Python cannot open the .py file

What to do if Python cannot open the .py file

coldplay.xixi
coldplay.xixiOriginal
2021-03-11 15:11:1743435browse

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.

What to do if Python cannot open the .py file

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:

What to do if Python cannot open the .py file

2. Press the Ctrl key and right-click the mouse to open the command menu:

What to do if Python cannot open the .py file

3. Select [Open command window here] in the command menu:

What to do if Python cannot open the .py file

4. Enter the python filename.py command in the open command line window:

What to do if Python cannot open the .py file

5. Type Enter, You can open the executable py file and the results are as follows:

What to do if Python cannot open the .py file

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!

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