Download Python
- Go to python.org/downloads
- The site will detect you’re on Windows and show the latest version
- Click the download button to get the installer
- Save it to your Downloads folder
Always get Python from the official website to ensure it’s secure and up-to-date.
Install Python
This is the most important part - pay close attention to step 2!- Find and run the downloaded installer
- Important: Check ✓ “Add python.exe to PATH” at the bottom
If you miss the “Add to PATH” checkbox, Python won’t work from Terminal. This is the #1 installation mistake.
- Click “Install Now” (not “Customize installation” unless you know what you’re doing)
- If Windows asks “Do you want to allow this app to make changes?”, click “Yes”
- Wait for installation (usually takes 1-2 minutes)
- Click “Close” when you see “Setup was successful”
Verify installation
Let’s make sure Python installed correctly:- Open Terminal:
- Press
Windows + R - Type
wtand pressEnter - Or search “Terminal” in Start menu
- Press
Windows Terminal is the modern app that can run Command Prompt (cmd), PowerShell, or other shells. It’s the recommended way to use Python on Windows.
- Type this command:
- You should see the Python version you just installed
On Windows, you can usually use
python (not python3 like on Mac/Linux).Test Python
Let’s run Python for the first time:- In Terminal, type:
- You’ll see something like:
- The
>>>means Python is running! Try:
- Press
Enterto see:
- To exit Python:
- Type
exit()and pressEnter - Or press
Ctrl + ZthenEnter
- Type
Troubleshooting
'python' is not recognized
'python' is not recognized
This means Python wasn’t added to PATH. Here’s how to fix it.
Quick Fix: TrySolution 1: Reinstall Python
Quick Fix: Try
py instead of python:- Uninstall Python from Settings > Apps
- Download and run installer again
- CHECK the “Add to PATH” box this time!
- Search “Environment Variables” in Start menu
- Click “Environment Variables” button
- Under “System variables”, find and double-click “Path”
- Click “New” and add these two paths:
- Replace
[YourName]with your Windows username - Replace
Python313with your actual Python version folder - Click OK on all windows
- Close and reopen Terminal
Permission denied
Permission denied
During installation:
- Right-click the installer
- Select “Run as administrator”
- Open Terminal as administrator
- Right-click Terminal > Run as administrator
Windows Defender blocking Python
Windows Defender blocking Python
Windows might flag Python as suspicious:
- When warning appears, click “More info”
- Click “Run anyway”
- Or add Python to Windows Defender exceptions:
- Settings > Windows Security > Virus & threat protection
- Add an exclusion > Folder
- Add Python installation folder
Multiple Python versions
Multiple Python versions
Windows can have multiple Python versions. To manage them:
See all versions:Use specific version:Set default version: Create
See all versions:
py.ini in your home folder with:Microsoft Store Python
Microsoft Store Python
If typing
python opens Microsoft Store:- Settings > Apps > Apps & features
- Click “App execution aliases”
- Turn OFF the Python aliases
- Use the python.org installer instead
Continue to VS Code introduction
Install and configure Visual Studio Code