1. Home
  2. Languages
  3. Python
  4. How to Install Python on Windows: A Step-by-Step Guide

How to Install Python on Windows: A Step-by-Step Guide

Below is a detailed step-by-step guide to correctly install Python on a Windows computer. Whether you’re a complete beginner or you just need a refresher, this task is straightforward and easy to accomplish.


Step-by-Step Guide: How to Install Python on Windows

Step 1: Download Python

  1. Open your preferred browser and navigate to the official Python website:

  2. Choose the version you want to install:

    • Recommended for beginners: Download the latest stable version (usually noted beneath "Download Python").
    • As of now, the latest stable version is Python 3.X.X. (Make sure to choose Python 3, as Python 2 is outdated.)

  3. After choosing the version, click on the Download button. This downloads a Python installer file (e.g., python-3.12.0-amd64.exe).


Step 2: Run the Python Installer

  1. Locate the downloaded installer in your downloads folder (default path usually C:\Users\[Your Username]\Downloads).
  2. Double-click on the downloaded installer file to start the installation process.


Step 3: Customize Python Installation Options (VERY IMPORTANT)

When the install dialogue box appears, consider these steps carefully.

  1. Before continuing, Click the checkbox at the bottom labeled:

    "Add Python to PATH"

    Note: This step ensures Python is accessible from the Windows Command Prompt and PowerShell.

  2. After clicking the checkbox, choose one of the two setup methods:

    • Install Now: Quick installation with Python’s default settings (recommended for most users).
    • Customize Installation: Allows you to choose specific features and locations where Python will be installed (for advanced users who may have specific needs).

Recommendation for beginners: select “Install Now”.


Step 4: Proceed with Installation

  1. After choosing "Install Now", installation will begin and progress status will be displayed.
  2. The installation typically takes a couple of minutes.
  3. Allow Python administrator privileges if prompted (simply click “Yes” if prompted).


Step 5: Finish Python installation

  1. Once the installation has finished successfully, a screen will appear noting that "Setup was successful."
  2. Click the “Close” button at the end to complete setup.


Step 6: Verify your Python Installation

It’s important to double-check that Python installed correctly:

  1. Open the Command Prompt on Windows (type "cmd" into your search bar and click on the "Command Prompt" app or press Win + R and type cmd).
  2. Type the following command and press Enter:
    bash
    python –version

  3. You should see output similar to:

    Python 3.12.0

    indicating Python is installed and accessible via your command line.

  4. Additionally, if you wish to check the Python package manager (pip), enter:
    bash
    pip –version

    You will get an output similar to:

    pip 23.0.1 from C:\Python312\lib\site-packages\pip (python 3.12)


Step 7: (Optional) Testing Python IDLE (Integrated Development and Learning Environment)

Python comes with an integrated development environment called IDLE. It’s a simple Python editor.

  1. Click the Windows Start Menu and type "IDLE".
  2. Select and run the “IDLE Python” option.
  3. A Python interactive shell window opens, and you can test entering some basic Python commands:

    python
    print("Hello, Python!")

  4. Hit Enter and you should see the message printed out, verifying everything works properly.


Troubleshooting Common Issues

  • Cannot access Python from Command Prompt?

    • You may have forgotten to select "Add Python to PATH" during installation.
    • Solution:

      • You could reinstall Python (quickest solution).
      • Alternatively, manually add Python to PATH in environment variables:
      • On the Windows search bar, type "Environment Variables".
      • Open "Edit the system environment variables" → "Environment Variables…".
      • Under "System Variables", find and select "Path" → "Edit" → "New"
      • Add the Python installation path (C:\Python312 or the folder where Python was installed) and the scripts path (C:\Python312\Scripts\).
      • Click "OK" and restart your Command Prompt afterward to apply changes.

  • If the Python Installer does not start

    • Right-click on the installer file and select "Run as administrator".


Congratulations!

You have successfully installed Python on your Windows computer! You are now ready to start coding, learning Python, and building your projects.

Happy coding! 🚀🐍

Updated on June 3, 2025
Was this article helpful?

Related Articles

Leave a Comment