How do I run a Python program under Windows?


To run Python Program on Windows, at first download and Install Python. Then, verify the installation and run your first program. Let’s see how.

Download Python

First, let us download the current python version from the official website. Go to −

https://python.org

After reaching the website, keep the mouse cursor on Downloads. Now, the current version of Python will be visible. Click on it to download −


Now, the download started. Wait for the download to complete. You will get an exe file as shown below python-3.10.6-amd64 as shown below −


Install Python

Now, double click on the exe file python-3.10.6-amd64. The installation begins. Select the checkbox, Add Python 3.10 to Path. After that, click Customize installation −


On the next screen, Optional Features are visible. The pip and IDLE will get installed −

  • PIP − The pip is used to install and manage Python packages.

  • IDLE − An IDE to run Python program.

The same is shown below. Click Next


Now, the Advanced Options are visible. Select Install for all users. The Python installation path is visible. This is where Python will get installed. Click Install


The installation begins and completes as shown below −


Verify the Python Installation

We installed Python above successfully. Let us verify the installation of Python.

Open cmd and type the following command.

python --version

After typing the command, press Enter. The same is shown below.


If after pressing Enter, the Python version is visible, that would mean Python installed successfully.

Run your first Python Program on Shell

After installing Python, run your first Python program there itself in the cmd. Type py and the shell will open as shown below.


Here, let us print a text using the print()in Python.

print("Amit's first Python Program")

After writing the above print(), press enter and the output will be visible −


Updated on: 20-Sep-2022

373 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements