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
- Visit python.org/downloads/windows/
- Click the latest stable version
- Download the “Windows installer (64-bit)”
Installation Steps
- Run the downloaded
.exefile - Important: Check “Add Python to PATH” at the bottom
- Click “Install Now” or choose “Customize installation”
- 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 --versionUsing Microsoft Store
You can also install Python from the Microsoft Store:
- Open Microsoft Store
- Search “Python 3.12”
- Click “Get” or “Install”
Using Chocolatey
If you use Chocolatey package manager:
choco install pythonUsing Winget
Windows 10/11 users can use Winget:
winget install Python.Python.3Virtual Environment Setup
python -m venv myproject
myproject\Scripts\activateVS Code Integration
- Install VS Code from code.visualstudio.com
- Install Python extension by Microsoft
- Select your Python interpreter using
Ctrl+Shift+P
Common Issues
Python not found in PATH
If you forgot to check “Add Python to PATH”:
- Open “Edit the system environment variables”
- Click “Environment Variables”
- 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-nameSources
For other platforms, check our Linux Python installation or macOS Python setup.