Install Python on Windows

Installing Python on Windows is straightforward with the official installer. This guide covers the best practices for Windows development.

Using Official Installer (Recommended)

Download Python

  1. Visit python.org/downloads/windows/
  2. Click the latest stable version
  3. Download the “Windows installer (64-bit)”

Installation Steps

  1. Run the downloaded .exe file
  2. Important: Check “Add Python to PATH” at the bottom
  3. Click “Install Now” or choose “Customize installation”
  4. For custom install, enable:
    • pip
    • tcl/tk and IDLE
    • Python test suite
    • py launcher
    • for all users

Verify Installation

Open Command Prompt or PowerShell:

python --version
pip --version

Using Microsoft Store

You can also install Python from the Microsoft Store:

  1. Open Microsoft Store
  2. Search “Python 3.12”
  3. Click “Get” or “Install”

Using Chocolatey

If you use Chocolatey package manager:

choco install python

Using Winget

Windows 10/11 users can use Winget:

winget install Python.Python.3

Virtual Environment Setup

python -m venv myproject
myproject\Scripts\activate

VS Code Integration

  1. Install VS Code from code.visualstudio.com
  2. Install Python extension by Microsoft
  3. Select your Python interpreter using Ctrl+Shift+P

Common Issues

Python not found in PATH

If you forgot to check “Add Python to PATH”:

  1. Open “Edit the system environment variables”
  2. Click “Environment Variables”
  3. Add Python path to System PATH:
    • C:\Users\YourUser\AppData\Local\Programs\Python\Python312\
    • C:\Users\YourUser\AppData\Local\Programs\Python\Python312\Scripts\

Pip not working

Use python -m pip instead of just pip:

python -m pip install package-name

Sources

For other platforms, check our Linux Python installation or macOS Python setup.