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

If you want to learn how to install Python on Windows, the easiest approach is to use the official Python Install Manager from Python.org or the Microsoft Store. After installing the manager, install a Python runtime, open Windows Terminal or PowerShell, and check that Python works. You can then verify pip, run your first Python program, and set up a code editor such as Visual Studio Code.

This guide covers the recommended installation method, alternative options, virtual environments, and common problems such as Windows opening the Microsoft Store instead of running Python.

Which Python Version Should You Install?

As of October 16, 2026, Python 3.15.0 is the latest major stable release, released on October 9, 2026. Python 3.14.8 is the latest maintenance release in the Python 3.14 series.

For a new project, you can use Python 3.15 if your required libraries and learning materials support it. If a course, workplace, or existing project specifies Python 3.14 or another supported version, follow that requirement instead.

Check the official Python downloads page for current releases and installation options. The official Windows documentation explains how the Python Install Manager works.

Method 1: Install Python Using the Official Python Install Manager

The Python Install Manager is the recommended starting point in the current Python Windows documentation. It helps install and manage Python runtimes and makes commands such as python and py available in the terminal.

Step 1: Download the Install Manager

Visit the official Python downloads page.

Find the Windows download option for the Python Install Manager. You can also install the manager through the Microsoft Store. Both official routes provide the same manager.

Avoid downloading Python installers from unfamiliar third-party websites.

Step 2: Install the Manager

If you downloaded the installer from Python.org, open the downloaded file and follow the on-screen instructions.

If you are using the Microsoft Store, open the official Python Install Manager listing and select Install.

Once installation finishes, open Windows Terminal, PowerShell, or Command Prompt.

Step 3: Install a Python Runtime

The manager is the tool that manages Python installations; you also need a Python runtime to execute programs.

To install Python 3.15 explicitly, run:

py install 3.15

Wait for the installation to finish. If you need a different version, replace 3.15 with the version required by your project.

Step 4: Check Your Installation

Run:

python --version

If Python is available, the terminal should display a version number, such as:

Python 3.15.0

The exact output depends on the version installed.

You can also run:

py list

This displays the Python runtimes managed by the current Install Manager.

If the commands do not work, see the troubleshooting section below before reinstalling Python.

Other Ways to Install Python on Windows

You do not need to use every method below. Choose one installation route and verify that it works.

Option 1: Microsoft Store

The Microsoft Store provides the official Python Install Manager.

  1. Open the Microsoft Store.
  2. Search for Python Install Manager.
  3. Confirm that you have selected the official Python distribution.
  4. Select Install.
  5. Open Windows Terminal after installation.
  6. Run py install 3.15 to install the runtime.
  7. Check the installation with python --version.

This is convenient if you prefer installing applications through the Store rather than downloading an installer manually.

Option 2: Windows Package Manager (WinGet)

WinGet is useful if you prefer installing software from the terminal. The official Python documentation provides a command for installing the Python Install Manager:

winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity

After the installation, run:

py install 3.15

Then verify the result:

python --version

If WinGet reports that a package cannot be found or installed, use the Python.org or Microsoft Store method instead. Package availability can vary, and commands targeting a specific Python version do not necessarily install the newest release.

Option 3: Traditional Windows Installer

The traditional installer remains an option for users following a course or workflow that specifically requires it.

  1. Visit the official Python Windows downloads page.
  2. Choose the appropriate installer for your Windows system.
  3. Open the downloaded file.
  4. Follow the installation instructions.
  5. If the installer offers an option to add Python to PATH, review it carefully.
  6. Finish the installation and open a new terminal.
  7. Run python --version or py --version.

For most modern Windows PCs, the 64-bit installer is generally appropriate. Choose an ARM64 or other build when required by your hardware and setup.

Do not mix installation instructions from the traditional installer and the Install Manager without checking which installation your terminal is using.

How to Check Whether pip Is Installed

pip is the standard package installer commonly used to install Python libraries.

After installing Python, run:

python -m pip --version

If pip is available, the terminal displays its version and location.

Using python -m pip is helpful because it runs pip through the Python interpreter selected by the python command.

For example, to install the Requests library, run:

python -m pip install requests

You do not need to install packages immediately. Install them when a project requires them, and use a virtual environment to keep project dependencies separate.

For more information, consult the official Python Packaging User Guide.

Create a Virtual Environment for Your Project

A virtual environment gives a project its own package environment. This helps prevent dependencies for one project from interfering with another.

Step 1: Create a Project Folder

In PowerShell, run:

mkdir python-project
cd python-project

Step 2: Create the Environment

Run:

python -m venv .venv

This creates a virtual environment in a folder named .venv inside your project directory.

Step 3: Activate the Environment

In PowerShell, use:

.venv\Scripts\Activate.ps1

In Command Prompt, use:

.venv\Scripts\activate.bat

After activation, the terminal prompt will usually show (.venv).

Now, when you install packages using python -m pip, they will normally be installed into the active environment rather than the global Python installation.

To leave the environment when you finish, run:

deactivate

What if PowerShell Blocks the Activation Script?

PowerShell may display an execution-policy error when you try to run Activate.ps1.

Do not immediately weaken system-wide security settings just to activate a Python environment. If you want a simple alternative, open Command Prompt in the project folder and run:

.venv\Scripts\activate.bat

If you need PowerShell activation, consult the official Python Windows documentation and your organization’s security guidance before changing execution policies.

Run Your First Python Program

Once Python is installed, test it with a small program.

Step 1: Create a Python File

Open Notepad or your preferred code editor. Create a new file and save it as:

hello.py

Make sure the file ends in .py, not .py.txt. If Windows hides file extensions, check the file name in File Explorer.

Step 2: Add Some Code

Enter the following:

print("Hello, Python!")

Save the file.

Step 3: Run the Program

Open a terminal in the folder containing hello.py and run:

python hello.py

You should see:

Hello, Python!

If the message appears, Python has successfully executed your program.

If you want to practise further, try changing the text inside the quotation marks and running the file again.

Set Up Visual Studio Code for Python

You can write Python in a basic text editor, but a dedicated code editor makes it easier to work with larger projects.

Visual Studio Code is one option. It supports Python development through Microsoft’s Python extension.

Install VS Code and the Python Extension

  1. Download and install VS Code from the official website.
  2. Open VS Code.
  3. Select the Extensions panel.
  4. Search for Python.
  5. Install the Python extension published by Microsoft.
  6. Open the folder containing your Python project.
  7. Open or create a .py file.

The extension provides Python-specific features such as code completion, debugging, and interpreter selection.

Select the Correct Python Interpreter

If VS Code cannot find Python or cannot locate a package you installed, it may be using a different interpreter from the one you selected in the terminal.

To check:

  1. Open the Command Palette in VS Code.
  2. Search for Python: Select Interpreter.
  3. Choose the Python installation or virtual environment you want to use.
  4. Open the terminal in VS Code and run:
python --version

If you are working inside a virtual environment, select the interpreter inside your project’s .venv folder.

Troubleshooting Common Python Installation Problems

If Python does not work immediately, identify the specific problem before changing PATH or reinstalling the software.

1. “Python Was Not Found”

Open a new terminal and run:

python --version

Then try:

py --version

If neither command works, check that the Python Install Manager and a Python runtime are installed. With the manager, you can install a runtime by running:

py install 3.15

Close and reopen the terminal after installing software, especially if the commands were unavailable before installation.

2. Typing python Opens the Microsoft Store

Windows can use app execution aliases that redirect Python commands to the Microsoft Store.

First, check whether you have installed a Python runtime. If you are using the Python Install Manager, try:

py list

If the runtime is installed but the command still opens the Store, review the Windows app execution aliases and the Python installation’s command configuration. Check the official Python troubleshooting guidance before changing system settings.

3. “pip Is Not Recognized”

You may not need to modify PATH. Try:

python -m pip --version

If it works, install packages using the same form:

python -m pip install package-name

If pip is unavailable, check the Python installation and consult the official Python packaging instructions before attempting a separate installation.

4. VS Code Cannot Find Python or a Package

Use Python: Select Interpreter to select the correct installation.

If the package was installed inside a virtual environment, make sure VS Code is using that environment rather than another Python runtime.

You can compare the interpreter used by the terminal with the one selected in VS Code by running python --version in the relevant terminal.

5. You Have More Than One Python Version

Multiple Python versions can coexist on Windows. The important thing is to know which version each project uses.

To list runtimes managed by the Python Install Manager, run:

py list

To install a particular version, use the appropriate version tag. For example:

py install 3.14

This can be useful if a project requires Python 3.14 instead of Python 3.15.

Should You Add Python to PATH?

With the Python Install Manager, manually adding Python directories to PATH is not always necessary. The manager provides commands for launching and managing runtimes, and the official documentation explains when PATH configuration is optional.

If python and py already work, do not change PATH simply because an older tutorial tells you to. If a command is missing, first determine which installation method you used and follow its troubleshooting instructions.

What to Do After Installing Python

Once Python works, focus on learning how to use it rather than installing more tools.

A sensible learning sequence is:

  1. Learn variables and data types.
  2. Practise conditions and loops.
  3. Write and call functions.
  4. Work with lists and dictionaries.
  5. Read and write files.
  6. Learn to handle errors.
  7. Use virtual environments for projects.
  8. Build small programs that solve practical problems.

For example, you could create a calculator, a task tracker, or a simple expense calculator. Small projects help you understand how Python works without overwhelming you with too many features.

If you want to explore what you can build with the language, read our guide to what Python is used for.

Frequently Asked Questions

Is Python free to install on Windows?

Yes. Python is open-source software, and the official Python Install Manager is available through Python.org and the Microsoft Store.

Which Python version should beginners install?

Python 3.15.0 is the latest major stable release as of October 16, 2026. It is a reasonable choice for new projects that support it. If your course or project requires Python 3.14 or another version, follow that requirement instead.

Do I need to install pip separately?

Usually not for a standard current Python installation. Check by running python -m pip --version. If pip is available, you can use it through the selected Python interpreter.

Can I install Python without VS Code?

Yes. VS Code is optional. You can run Python from Windows Terminal, PowerShell, or Command Prompt and write code using another editor.

Can I install more than one Python version?

Yes. Multiple runtimes can be installed. The Python Install Manager supports listing and managing versions through commands such as py list and py install.

Why does Python work in Command Prompt but not in VS Code?

VS Code may be using a different Python interpreter or virtual environment. Open the Command Palette, select Python: Select Interpreter, and choose the environment associated with your project.

Final Thoughts

Installing Python on Windows is straightforward when you use the official Python Install Manager, install a suitable runtime, and verify the result with python --version. Check pip with python -m pip --version, create a virtual environment for each project, and test your setup by running a small .py file.

If a command fails, check the installed runtime, interpreter selection, and Windows command configuration before reinstalling Python or changing PATH.

Once your setup works, start writing small programs and build on what you learn. The goal is not simply to install Python, but to use it confidently in real projects.

Leave a Comment