Your Preferences

  • OS:
  • Level:

Change Preferences


Tutorial Navigation

Viewing a single segment.


Related Content

Verify Python Installation on Windows

Description: Confirm your Python installation on Windows by checking the version and launching the interactive shell using the command prompt.

Skill Level: Beginner

Operating System(s): Windows 10+, Windows 11

Author: AI FullTutorialGen (beginner) - Topic: Demonstrate how to verify the Python installation by opening the Windows command prompt and typing 'python --version' and 'py --version'. Explain the expected output. Also, show how to launch the Python interactive s

Published: 01 Jun 2025

Last Updated: 01 Jun 2025

0
1
0
0
Tags: python beginner windows installation version command prompt interactive shell

Verifying Your Python Installation

Now that you've installed Python, let's confirm it's working correctly. We'll do this by checking the Python version and launching the interactive shell.

Opening the Windows Command Prompt

First, you need to open the Windows Command Prompt. There are several ways to do this:

  1. Press the Windows key, type cmd, and press Enter.
  2. Right-click the Windows Start button and select "Terminal" or "Windows PowerShell" (either will work for these commands).

Checking the Python Version

Once the Command Prompt is open, you can check the Python version using one of two commands:

  • python --version
  • py --version

Try both commands. The py command is the Python Launcher for Windows, and it's useful if you have multiple Python versions installed.

Expected Output:

You should see output similar to this:

Python 3.11.4

The exact version number will depend on the version you installed. If you receive an error message like "'python' is not recognized...", it means Python is not in your system's PATH environment variable. (This is covered in a separate tutorial segment.)

Launching the Python Interactive Shell

The Python interactive shell allows you to execute Python code line by line. You can launch it using either of these commands:

  • python
  • py

Expected Output:

After running one of these commands, you should see something like this:

Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

The >>> prompt indicates that you are now in the Python interactive shell. You can type Python code here and press Enter to execute it. For example:

>>> print("Hello, world!")
Hello, world!
>>>

To exit the interactive shell, type exit() and press Enter, or press Ctrl+Z and then Enter.

Further Resources

For more information about the Python Launcher for Windows, see the official documentation: Python Launcher for Windows

You can also find helpful information about the Python interactive shell on the official Python website: The Python Interactive Interpreter

Expected Outcome for this step:

User will be able to verify their Python installation and launch the Python interactive shell from the Windows command prompt.


Segment Comments

Comments for "Verify Python Installation on Windows" will be displayed here.

Overall comments for single segments are displayed with the segment content above. This section can be used for a separate comment form if desired.

(Form to add overall tutorial comments coming soon)