• About
  • Contact
  • Cookie
  • Disclaimer
  • Privacy Policy
  • Change the purpose of use

Tnhelearning.edu.vn - Various useful general information portal

  • Photo
  • Bio
  • How To
  • Tech

How to Launch Python Files Using Windows Command Prompt

December 2, 2023 by admin Category: How To

You are viewing the article How to Launch Python Files Using Windows Command Prompt  at Tnhelearning.edu.vn you can quickly access the necessary information in the table of contents of the article below.

X

This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

This article has been viewed 49,381 times.

This wikiHow teaches you how to open Python files using the built-in Command Prompt program on Windows computers. In most cases, you will open the file without any problems as long as Python is available on the machine. If your computer uses an old version of Python, or you customized it when installing and did not add the “python” command to the “Path” variable list, proceed to add Python to the “Path” variable list to be able to start run the Python file through Command Prompt.

Table of Contents

  • Steps
    • Find Python file path
    • Launch Python file
    • Add Python to PATH list

Steps

Find Python file path

Image titled Use Windows Command Prompt to Run a Python File Step 1

Image titled Use Windows Command Prompt to Run a Python File Step 1

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/1c/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-1.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-1.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/1c/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-1.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-1. jpg”,”smallWidth”:460,”smallHeight”:342,”bigWidth”:728,”bigHeight”:542,”licensing”:”<div class=”mw-parser-output”></div>”}
Go to the directory where the Python file is located. Find the Python file you want to open on the Command Prompt.

  • If you already know the directory path of the Python file to open, you can open the file on Command Prompt right away.
Image titled Use Windows Command Prompt to Run a Python File Step 2

Image titled Use Windows Command Prompt to Run a Python File Step 2

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/3d/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-2.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/3d/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-2.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-2. jpg”,”smallWidth”:460,”smallHeight”:349,”bigWidth”:728,”bigHeight”:553,”licensing”:”<div class=”mw-parser-output”></div>”}
Select the Python file. Click on the Python file for which you want to see the directory path.
Image titled Use Windows Command Prompt to Run a Python File Step 3

Image titled Use Windows Command Prompt to Run a Python File Step 3

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/80/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-3.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-3.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/8/80/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-3.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-3. jpg”,”smallWidth”:460,”smallHeight”:342,”bigWidth”:728,”bigHeight”:542,”licensing”:”<div class=”mw-parser-output”></div>”}
Right click on the Python file. A menu will drop down.
Image titled Use Windows Command Prompt to Run a Python File Step 4

Image titled Use Windows Command Prompt to Run a Python File Step 4

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/a/a9/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-4.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/a/a9/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-4.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-4. jpg”,”smallWidth”:460,”smallHeight”:342,”bigWidth”:728,”bigHeight”:542,”licensing”:”<div class=”mw-parser-output”></div>”}
Click the Properties option located in the drop-down menu. The Properties window will open.
Image titled Use Windows Command Prompt to Run a Python File Step 5

Image titled Use Windows Command Prompt to Run a Python File Step 5

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/1e/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-5.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-5.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/1e/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-5.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-5. jpg”,”smallWidth”:460,”smallHeight”:349,”bigWidth”:728,”bigHeight”:552,”licensing”:”<div class=”mw-parser-output”></div>”}
Record the “Location” value. The directory address (or “path”) to the right of the “Location” header is the information you need to enter into the Command Prompt to switch to the directory containing the Python file.

  • You can copy the location by highlighting the information (click and drag your mouse over the “Location” value) and then press Ctrl + C .
READ More:   How to Remove the Phone Holder

Launch Python file

Image titled Use Windows Command Prompt to Run a Python File Step 6

Image titled Use Windows Command Prompt to Run a Python File Step 6

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/c7/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-6.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-6.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/c7/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-6.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-6. jpg”,”smallWidth”:460,”smallHeight”:344,”bigWidth”:728,”bigHeight”:545,”licensing”:”<div class=”mw-parser-output”></div>”}
Open Start

Windows Start

{“smallUrl”:”https://www.wikihow.com/images_en/0/07/Windowsstart.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/07/ Windowsstart.png/30px-Windowsstart.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output “></div>”}

. Click the Windows icon in the lower left corner of the screen. The Start menu will pop up.

Image titled Use Windows Command Prompt to Run a Python File Step 7

Image titled Use Windows Command Prompt to Run a Python File Step 7

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/9e/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-7.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-7.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/9e/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-7.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-7. jpg”,”smallWidth”:460,”smallHeight”:342,”bigWidth”:728,”bigHeight”:542,”licensing”:”<div class=”mw-parser-output”></div>”}
Find Command Prompt. Type cmd to find Command Prompt.
Image titled Use Windows Command Prompt to Run a Python File Step 8

Image titled Use Windows Command Prompt to Run a Python File Step 8

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/a/ac/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-8.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-8.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/a/ac/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-8.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-8. jpg”,”smallWidth”:460,”smallHeight”:347,”bigWidth”:728,”bigHeight”:549,”licensing”:”<div class=”mw-parser-output”></div>”}
Click on the program

Windows cmd

{“smallUrl”:”https://www.wikihow.com/images_en/6/66/Windowscmd1.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/66/ Windowscmd1.png/36px-Windowscmd1.png”,”smallWidth”:460,”smallHeight”:383,”bigWidth”:36,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output” “></div>”}

Command Prompt appears at the top of the Start menu. Command Prompt will open.

Image titled Use Windows Command Prompt to Run a Python File Step 9

Image titled Use Windows Command Prompt to Run a Python File Step 9

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/9f/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-9.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-9.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/9f/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-9.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-9. jpg”,”smallWidth”:460,”smallHeight”:343,”bigWidth”:728,”bigHeight”:543,”licensing”:”<div class=”mw-parser-output”></div>”}
Switch to the directory containing the Python file. Type the command cd and space, then enter the “Location” address of the Python file and press ↵ Enter .

  • For example, to open a Python file located in the “Files” folder on the Desktop, you need to enter cd desktop/Files here.
  • If you copied the file path then type cd with a space and then press Ctrl + V to paste the path.
Image titled Use Windows Command Prompt to Run a Python File Step 10

Image titled Use Windows Command Prompt to Run a Python File Step 10

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/80/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-10.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-10.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/8/80/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-10.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-10. jpg”,”smallWidth”:460,”smallHeight”:342,”bigWidth”:728,”bigHeight”:541,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter the command “python” along with the filename to open. Enter the command python file.py , replacing file with the Python filename.

  • For example, if the Python file is named “script” then you need to enter python script.py here.
  • If the Python file has more than one space in the name, we enclose the name with the file extension in quotes (e.g. python "my script.py" ).
Image titled Use Windows Command Prompt to Run a Python File Step 11

Image titled Use Windows Command Prompt to Run a Python File Step 11

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/7/70/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-11.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-11.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/7/70/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-11.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-11. jpg”,”smallWidth”:460,”smallHeight”:342,”bigWidth”:728,”bigHeight”:541,”licensing”:”<div class=”mw-parser-output”></div>”}
Press ↵ Enter . The command will be executed and open the Python file in the Python program available on the computer.

  • If the error 'python' is not recognized as an internal or external command appears after pressing Enter , you need to add Python to the PATH list and then try again.

Add Python to PATH list

Image titled Use Windows Command Prompt to Run a Python File Step 12

Image titled Use Windows Command Prompt to Run a Python File Step 12

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/80/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-12.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-12.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/8/80/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-12.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-12. jpg”,”smallWidth”:460,”smallHeight”:348,”bigWidth”:728,”bigHeight”:550,”licensing”:”<div class=”mw-parser-output”></div>”}
Show hidden folders. Since one of the directories containing the Python installation directory is most likely hidden, we need to unhide them before continuing:

  • Open File Explorer
    Windows File Explorer

    {“smallUrl”:”https://www.wikihow.com/images_en/0/04/File_Explorer_Icon.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/04/ File_Explorer_Icon.png/30px-File_Explorer_Icon.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output “></div>”}

    .

  • Click the View tab.
  • Check the “Hidden items” box.
READ More:   How to Introduce Yourself to the Class
Image titled Use Windows Command Prompt to Run a Python File Step 13

Image titled Use Windows Command Prompt to Run a Python File Step 13

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/39/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-13.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-13.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/39/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-13.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-13. jpg”,”smallWidth”:460,”smallHeight”:348,”bigWidth”:728,”bigHeight”:551,”licensing”:”<div class=”mw-parser-output”></div>”}
Go to the Python directory. In some cases, the path to Python will be “C:Python27”; however, if you have installed the latest version of Python using the default settings, the program will be in a hidden folder. You can copy the appropriate file path by:

  • Click This PC on the left side of the File Explorer window.
  • Double-click the hard drive located in the “Devices and drives” section.
  • Scroll down and double-click the “Users” folder.
  • Double-click the folder with your username.
  • Scroll down and double click “AppData”.
  • Double-click “Local”.
  • Scroll down and double-click “Programs”.
  • Double click on the “Python” folder.
  • Double-click the Python folder with the appropriate version number (e.g. “Python36”).
Image titled Use Windows Command Prompt to Run a Python File Step 14

Image titled Use Windows Command Prompt to Run a Python File Step 14

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/34/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-14.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-14.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/34/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-14.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-14. jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Copy the path to the Python directory. Click the address bar at the top of the File Explorer window to highlight the content, then press Ctrl + C to copy the last address.
Image titled Use Windows Command Prompt to Run a Python File Step 15

Image titled Use Windows Command Prompt to Run a Python File Step 15

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/0f/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-15.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-15.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/0f/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-15.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-15. jpg”,”smallWidth”:460,”smallHeight”:344,”bigWidth”:728,”bigHeight”:545,”licensing”:”<div class=”mw-parser-output”></div>”}
Open the Power User menu. To proceed, right-click on the Start icon

Windows Start

{“smallUrl”:”https://www.wikihow.com/images_en/0/07/Windowsstart.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/07/ Windowsstart.png/30px-Windowsstart.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output “></div>”}

. A menu will pop up.

  • You can also press ⊞ Win + X to open the Power User pop-up menu.
Image titled Use Windows Command Prompt to Run a Python File Step 16

Image titled Use Windows Command Prompt to Run a Python File Step 16

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/d8/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-16.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-16.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/d/d8/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-16.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-16. jpg”,”smallWidth”:460,”smallHeight”:344,”bigWidth”:728,”bigHeight”:545,”licensing”:”<div class=”mw-parser-output”></div>”}
Click the System option located in the pop-up menu. A new window will open.
Image titled Use Windows Command Prompt to Run a Python File Step 17

Image titled Use Windows Command Prompt to Run a Python File Step 17

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/c8/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-17.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-17.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/c8/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-17.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-17. jpg”,”smallWidth”:460,”smallHeight”:346,”bigWidth”:728,”bigHeight”:547,”licensing”:”<div class=”mw-parser-output”></div>”}
Click System info . This link is in the upper right corner of the window. The System Information window will open.
Image titled Use Windows Command Prompt to Run a Python File Step 18

Image titled Use Windows Command Prompt to Run a Python File Step 18

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/d4/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-18.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-18.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/d/d4/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-18.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-18. jpg”,”smallWidth”:460,”smallHeight”:344,”bigWidth”:728,”bigHeight”:544,”licensing”:”<div class=”mw-parser-output”></div>”}
Click the Advanced system settings link. This link is located in the upper left of the System Information window. At this point, another window will pop up.
Image titled Use Windows Command Prompt to Run a Python File Step 19

Image titled Use Windows Command Prompt to Run a Python File Step 19

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/9b/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-19.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-19.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/9b/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-19.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-19. jpg”,”smallWidth”:460,”smallHeight”:343,”bigWidth”:728,”bigHeight”:543,”licensing”:”<div class=”mw-parser-output”></div>”}
Click Environment Variables… . This option is located in the lower-right corner of the pop-up window.
Image titled Use Windows Command Prompt to Run a Python File Step 20

READ More:   How to Reduce Wrinkles with Retin A

Image titled Use Windows Command Prompt to Run a Python File Step 20

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/41/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-20.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-20.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/41/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-20.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-20. jpg”,”smallWidth”:460,”smallHeight”:348,”bigWidth”:728,”bigHeight”:551,”licensing”:”<div class=”mw-parser-output”></div>”}
Look for the “Path” heading in the “User variables” table. This pane is at the top of the Environment Variables window.

  • You may need to scroll your mouse pointer up or down on the “User variables” pane to find the “Path” variable.
Image titled Use Windows Command Prompt to Run a Python File Step 21

Image titled Use Windows Command Prompt to Run a Python File Step 21

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/85/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-21.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-21.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/8/85/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-21.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-21. jpg”,”smallWidth”:460,”smallHeight”:341,”bigWidth”:728,”bigHeight”:540,”licensing”:”<div class=”mw-parser-output”></div>”}
Double-click the “Path” heading. A window will pop up.
Image titled Use Windows Command Prompt to Run a Python File Step 22

Image titled Use Windows Command Prompt to Run a Python File Step 22

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/46/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-22.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-22.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/46/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-22.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-22. jpg”,”smallWidth”:460,”smallHeight”:348,”bigWidth”:728,”bigHeight”:551,”licensing”:”<div class=”mw-parser-output”></div>”}
Click the New option on the right side of the window. A text field will appear in the middle of the window.
Image titled Use Windows Command Prompt to Run a Python File Step 23

Image titled Use Windows Command Prompt to Run a Python File Step 23

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/a/aa/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-23.jpg/v4- 728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-23.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/a/aa/ Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-23.jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-23. jpg”,”smallWidth”:460,”smallHeight”:347,”bigWidth”:728,”bigHeight”:549,”licensing”:”<div class=”mw-parser-output”></div>”}
Paste the path that you copied earlier. Press Ctrl + V to paste the content. The path you copied will appear in the text field in the center of the window.
  • Image titled Use Windows Command Prompt to Run a Python File Step 24

    Image titled Use Windows Command Prompt to Run a Python File Step 24

    {“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/82/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-24-Version-2. jpg/v4-728px-Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-24-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/ images/thumb/8/82/Use-Windows-Command-Prompt-to-Run-a-Python-File-Step-24-Version-2.jpg/v4-728px-Use-Windows-Command-Prompt-to- Run-a-Python-File-Step-24-Version-2.jpg”,”smallWidth”:460,”smallHeight”:344,”bigWidth”:728,”bigHeight”:544,”licensing”:”<div class=”mw-parser-output”></div>”}
    Click OK on the three open windows. The system will save the changes and close the three windows “Path”, “Environmental Variables” and “System Properties”.
  • X

    This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

    The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

    This article has been viewed 49,381 times.

    This wikiHow teaches you how to open Python files using the built-in Command Prompt program on Windows computers. In most cases, you will open the file without any problems as long as Python is available on the machine. If your computer uses an old version of Python, or you customized it when installing and did not add the “python” command to the “Path” variable list, proceed to add Python to the “Path” variable list to be able to start run the Python file through Command Prompt.

    Thank you for reading this post How to Launch Python Files Using Windows Command Prompt at Tnhelearning.edu.vn You can comment, see more related articles below and hope to help you with interesting information.

    Related Search:

    Related Posts

    How to Create Curved Text in Photoshop
    How to fall asleep faster
    How to Install FBReader to Read eBooks

    Category: How To

    Previous Post: « Top 999+ instagram story images – Amazing Collection instagram story images Full 4K
    Next Post: Top 999+ Awkwafina Wallpaper Full HD, 4K✅Free to Use »

    Copyright © 2025 · Tnhelearning.edu.vn - Useful Knowledge