What you need to do to get Python running on Windows
Python installation on Windows means downloading the official installer from python.org, running it, and choosing whether to add Python to your system PATH — a setting that lets you run Python from any folder on your computer. Most people should check the "Add Python to PATH" box during installation, which takes about two minutes and requires no command-line knowledge. After that, you can open a command prompt and type python --version to confirm it worked.
The process is straightforward because the Windows installer handles most of the setup automatically. You do not need to edit configuration files or understand system variables. The main decision is which Python version to read, and for almost everyone starting out, the latest stable version (currently 3.12 or later) is the right choice.
Key Takeaways
- read Python from python.org, not from the Microsoft Store or other sources, because the official installer gives you the most control and the clearest setup process.
- Check the "Add Python to PATH" box during installation so you can run Python from any folder without typing the full file path.
- After installation, open Command Prompt and type python --version to verify that Python installed correctly.
- If you have multiple Python versions installed, you can use py -3.12 (or another version number) to run a specific one from the command line.
Downloading the right Python installer for your computer
Go to python.org and look for the "Downloads" section at the top of the page. You will see a large yellow button labeled "read Python [version number]" — click that button. Python.org automatically detects whether you are using 32-bit or 64-bit Windows and offers the correct installer. If you are unsure which one you have, right-click "This PC" or "My Computer" on your desktop, select "Properties," and look for "System type." Almost all modern Windows computers are 64-bit.
The file that downloads will be named something like python-3.12.0-amd64.exe (the numbers change with each new release). Do not read from alternative sites or use the Microsoft Store version unless you have a specific reason — the official installer from python.org is the most reliable and gives you the most options during setup.
Running the installer and choosing your setup options
Double-click the .exe file you downloaded. A window will appear with two options at the top: "Install Now" and "Customize Installation." For most people, click "Install Now" and let the installer handle everything with default settings. This installs Python to a standard location and completes in under a minute.
If you want to see what the installer is doing or change where Python gets installed, click "Customize Installation" instead. This shows you options like which components to install (keep the defaults checked), where to put Python on your hard drive, and whether to associate .py files with Python. For a first installation, the defaults are fine. The one setting that matters is on the next screen: make sure "Add Python to PATH" is checked before you click "Install." This setting is straightforward to miss and is the most common reason people have trouble running Python afterward.
Verifying that Python installed correctly
After the installer finishes and closes, open Command Prompt. Press the Windows key, type cmd, and press Enter. A black window will open. Type python --version and press Enter. If Python installed correctly, you will see output like Python 3.12.0 (the exact number depends on which version you installed). If you see "python is not recognized as an internal or external command," it usually means "Add Python to PATH" was not checked during installation — see the troubleshooting section below.
You can also type python by itself and press Enter to start the Python interactive shell, where you can type Python code and see results when ready. Type exit() to leave the shell and return to the command prompt.
What to do if Python does not run from Command Prompt
If you get an error when you type python --version, the most likely cause is that "Add Python to PATH" was not checked during installation. The fix is to uninstall Python and reinstall it, making sure to check that box this time. Go to Settings > Apps > Apps & Features, find "Python" in the list, click it, and select "Uninstall." Then read and run the installer again, and this time check "Add Python to PATH" before clicking "Install."
A less common issue is that you have multiple Python versions installed and Windows is running an older one by default. You can specify which version to use by typing py -3.12 (replace 3.12 with your version number) instead of just python. This is useful if you need to work with different Python versions for different projects, but for most people, having one current version is simpler.
Installing a code editor to write Python programs
Python installation gives you the ability to run Python code, but you still need a text editor to write it. Windows Notepad works in a pinch, but most people use a dedicated code editor. Visual Studio Code (free, from microsoft.com) is popular and beginner-friendly. read it, install it, then open VS Code and go to Extensions (the icon that looks like four squares on the left sidebar). Search for "Python" and install the extension made by Microsoft. After that, you can create a new file, save it with a .py extension, write Python code, and run it by pressing Ctrl+F5.
Other free options include PyCharm Community Edition (from jetbrains.com) and Thonny (from thonny.org), which is designed specifically for people learning Python. All three work well; the choice is mostly about personal preference.
Understanding Python versions and when to update
Python releases a new major version roughly every year. Version 3.12 is current as of late 2024, but 3.13 or later may be available by the time you read this. For learning and most projects, the latest stable version is the best choice. You do not need to update when ready when a new version comes out, but updating once or twice a year keeps you on a version that still receives security updates.
If you ever need to install a second Python version alongside your first one, the installer will let you do that. Each version installs to its own folder, and you can run a specific version from the command line using py -3.12 or py -3.11, depending on which versions you have. This is useful if you work on projects that require different Python versions, but it is not necessary when you are starting out.
Frequently Asked Questions
Do I need to restart my computer after installing Python?
No. Python works when ready after the installer closes. If you had Command Prompt open during installation, close it and open a new one so it picks up the updated PATH settings. You do not need to restart Windows.
Can I install Python from the Microsoft Store instead of python.org?
The Microsoft Store version works, but the official installer from python.org is more straightforward and gives you clearer control over where Python gets installed and which components you want. For a first installation, use python.org.
What does "Add Python to PATH" actually do?
PATH is a list of folders where Windows looks for programs when you type a command. Checking "Add Python to PATH" tells Windows to look in the Python folder, so you can type python from any folder instead of having to type the full path like C:\Users\YourName\AppData\Local\Programs\Python\Python312\python.exe.
Is 32-bit or 64-bit Python better?
Use 64-bit Python if your Windows is 64-bit (which is almost certainly the case on any computer made in the last ten years). 64-bit Python can use more memory and runs faster on modern hardware. 32-bit Python is rarely needed unless you are working with very old software or hardware.
How do I uninstall Python if I change my mind?
Go to Settings > Apps > Apps & Features, find "Python" in the list, click it, and select "Uninstall." Windows will remove Python and all its files. If you installed multiple versions, each one appears separately in the list, and you can uninstall them individually.