How to install Python on Windows?

Submitted by Kamal Wickramanayake on Sun, 11/08/2020 - 22:51

Python can be installed from the Microsoft Store. Alternatively, follow the steps given below to download it from the Python website and install.

Visit the download page: Python Releases for Windows.

Look at the downloads listed under the latest stable release.

There are three types of downloads:

  1. Full installer (executable installer) - This contains everything needed.
  2. Web-based installer - This is a small download that downloads additional software during installation.
  3. Embeddable zip file - This is suitable if Python is to be added as a piece of software of another software.

In most of the cases, you will download the full installer. Let's assume you want it downloaded and installed.

Download the correct file based on the architecture of the computer. For example, if the computer is 64-bit, download "Windows x86-64 executable installer". For a 32-bit system, download "Windows x86 executable installer".

Run the downloaded installer. It will show a screen similar to this:

Python for Windows

Change the installation location if needed.

Make sure the "Add Python x.x to PATH" selected where x.x indicates the downloaded release.

Click on "Install Now" and wait until the installation is finish.

Upon installation, application launcher menu will contain new menu items related to Python.

Python IDLE is a software development tool. IDLE stands for Integrated Development and Learning Environment. If run, it will appear like this:

Python IDLE

Python interactive shell will appear like this:

Python interactive shell

If you are interested in testing, type the below line of Python code after the prompt (">>>") and hit enter:

print("Hello World!")

You will see that the text "Hello World!" is echoed.

To exit, type CTRL+z and then Enter.

To check if the effect of selecting "Add Python x.x to PATH" during installation, get a Command Prompt and type "python". You should see the Python interpreter running:

Python interpreter via a Command Prompt

To exit, type CTRL+z and then Enter.