Stay Updated Icon

Subscribe to Our Tech & Career Digest

Join thousands of readers getting the latest insights on tech trends, career tips, and exclusive updates delivered straight to their inbox.

Mastering Python Versions on Windows: A Deep Dive into the New Python Installation Manager

6:47 PM   |   15 June 2025

Mastering Python Versions on Windows: A Deep Dive into the New Python Installation Manager

Mastering Python Versions on Windows: A Deep Dive into the New Python Installation Manager

For developers and data scientists working on Microsoft Windows, Python has evolved from a sometimes-challenging environment to a robust, first-class citizen. The journey hasn't always been smooth, particularly when dealing with multiple versions of the Python interpreter. Historically, managing different Python installations, each potentially required by different projects with specific dependencies, could be a cumbersome process involving manual PATH modifications, environment variables, and careful installer management. While the built-in py launcher provided a convenient way to select which installed Python version to use for executing scripts, it lacked the crucial ability to actually *manage* those installations – adding, removing, or updating them from a single command-line interface.

Recognizing this long-standing need, the Python core development team has introduced a significant new tool: the Python Installation Manager for Windows. This initiative, formally proposed and detailed in PEP 0773, aims to provide a unified, official solution for the entire lifecycle of Python installations on the Windows operating system. It's designed to pick up where the py launcher left off, offering comprehensive management capabilities alongside version selection. While currently available as a pre-release, the Python Installation Manager is slated to become the preferred and official method for managing and selecting Python installations on Windows starting with Python 3.16. This marks a pivotal step towards simplifying the developer experience and bringing Windows in line with other operating systems that have long benefited from integrated version management tools.

Person kneels to tie their blue track shoes before a run.
Credit: Lazy_Bear / Shutterstock

This article serves as a comprehensive guide to understanding and getting started with the Python Installation Manager, exploring its features, how it integrates with existing tools, and what it means for Python development on Windows.

Setting Up the Python Installation Manager

Getting the Python Installation Manager onto your Windows system is straightforward, as it's distributed like any other Windows application. The developers have provided several convenient installation methods to suit different user preferences and workflows:

  • Microsoft Store App: For users who prefer a graphical interface and simple, one-click installation, the Microsoft Store offers the Python Installation Manager app. This method provides automatic updates and integrates seamlessly with the Windows ecosystem. It's often the easiest way for new users to get started.
  • Direct Download: The official Python website provides a direct download link for the installer. This method is useful for users who need offline installation or prefer to manage downloads manually. However, it's worth noting that this specific URL might change with future releases, so always check the official Python downloads page for the latest link.
  • WinGet Package Manager: For developers and system administrators who utilize command-line tools for software management, the Python Installation Manager is also available via Microsoft's WinGet package manager. A simple command like winget install 9NQ7512CXL7T will handle the installation. While the current package ID (9NQ7512CXL7T) is a bit cryptic, it's possible that a more user-friendly alias will be introduced in the future, making installation via WinGet even more intuitive.

Choosing the right installation method depends on your comfort level with different Windows interfaces and your existing development environment setup. Regardless of the method, the result is a powerful new tool ready to take control of your Python installations.

Python Installation Manager Replaces 'py' Launcher

One of the most significant changes introduced by the Python Installation Manager is its integration with the existing py command. If you've been developing on Windows, you're likely familiar with the py launcher, a utility that allows you to run a specific version of Python by typing py -3.9 my_script.py or simply py to run the default version. The new Python Installation Manager effectively replaces the underlying engine of this command.

When you install the Python Installation Manager, typing py in your command line will now invoke the manager itself, not just launch a Python interpreter. This is a crucial distinction. However, the developers have ensured backward compatibility; all the commands you used with the old py launcher to *run* specific Python versions (e.g., py -3.10, py -3) will continue to work as expected. The manager intercepts the command and routes it to the appropriate installed Python interpreter.

To see the change in action and explore the new capabilities, simply open your command prompt or PowerShell and type py help. Unlike the old launcher, which would typically throw an error or display minimal usage information for a 'help' command, the Python Installation Manager provides a detailed list of its available commands and options:

Python Installation Manager help options
IDG

This comprehensive help output immediately highlights the expanded functionality. You're no longer just launching Python; you're interacting with a dedicated tool designed for managing your Python ecosystem on Windows.

Adding and Removing Python Versions with Ease

The core function of the Python Installation Manager is to simplify the process of installing and uninstalling different Python versions. This is particularly valuable for developers who need to work with various project requirements, test compatibility across versions, or simply experiment with the latest Python releases without interfering with stable production environments.

Listing Installed Versions

Before you start adding or removing versions, it's helpful to see what you already have. The command py list provides a clear overview of the Python installations detected on your system:

Python Installation Manager listing versions of installed Python.
IDG

The output lists the detected Python versions. A key piece of information here is whether an installation is 'managed' by the Python Installation Manager. Installations that were present before you installed the manager (e.g., installed manually via the Python installer or the Microsoft Store before the manager took over) will be listed, but the manager won't be able to modify them directly. To gain full control over an existing installation using the manager, you'll typically need to uninstall it manually through the Windows 'Apps & features' settings and then reinstall it using the Python Installation Manager.

In the example output above, the Python 3.14 instance marked in green is managed by the tool, while others were installed previously by different means.

Installing New Versions

Adding a new Python version is remarkably simple with the manager. The command follows a predictable pattern: py install <version>. For instance, to install Python 3.11, you would type py install 3.11:

Python Installation Manager installing Python version 3.11.
IDG

The manager handles the download and installation process, placing the new Python version in a location it controls. Once the installation is complete, you can immediately start using the newly installed version. To invoke it, you use the familiar py -<version> syntax. For example, to run the Python 3.11 interpreter you just installed, you would type py -3.11:

Running Python 3.11 with the Python Installation Manager.
IDG

This seamless installation and invocation process eliminates the need to download installers manually, run through setup wizards, and worry about adding Python directories to your system's PATH environment variable – tasks that were historically prone to errors and conflicts on Windows.

Removing Versions

Just as easy as installing is removing a Python version that is managed by the tool. If you no longer need a specific version, perhaps because a project is complete or you've upgraded, you can uninstall it with a single command: py uninstall <version>. For example, to remove Python 3.11, you would use py uninstall 3.11:

Removing Python 3.11 with the Python Installation Manager.
IDG

The manager takes care of removing the installation cleanly from your system, ensuring no residual files or registry entries are left behind, which can sometimes happen with manual uninstallations or older methods.

Exploring Available Versions Online

The py list command shows you what's installed locally. But what if you want to see which Python versions are available for installation through the manager? The py list --online command fetches the list of available versions from the official sources, allowing you to discover and install the latest releases or specific older versions as needed.

Exporting Installation Data

For scripting, automation, or integration with other tools, the Python Installation Manager offers the ability to export the list of installed Python versions in structured formats. The command py list -f=json will output the list in JSON format. CSV and JSONL (JSON Lines) formats are also supported, providing flexibility for parsing this information programmatically.

Setting the Default Python Version

While the ability to invoke specific Python versions using py -<version> is powerful, you often need a 'default' Python version that runs when you simply type py or python (depending on your system configuration). The Python Installation Manager provides a clear way to see which version is currently considered the default by the manager.

When you run py list, the default version managed by the tool is indicated with an asterisk (*):

The default version of Python (3.14) is shown with an asterisk in the Python Installation Manager..
IDG

In this example, Python 3.14 is currently set as the default. This means that typing py without a version specifier will launch the Python 3.14 interpreter.

Changing the default version managed by the tool is achieved by setting a specific environment variable: PYTHON_MANAGER_DEFAULT. The value of this variable should be the version number you want to set as the default. The exact command to set an environment variable varies slightly depending on the shell you are using:

  • PowerShell: $Env:PYTHON_MANAGER_DEFAULT="3.12"
  • Command Prompt (cmd.exe): set PYTHON_MANAGER_DEFAULT=3.12
  • Bash (e.g., Git Bash, WSL): export PYTHON_MANAGER_DEFAULT="3.12"

After setting this environment variable in your current shell session (or system-wide if you configure it permanently), the Python Installation Manager will recognize your preference. Running py list again will show the asterisk next to the newly designated default version:

The new default version of Python (3.12) is shown with an asterisk in the Python Installation Manager.
IDG

This method provides a flexible way to switch your default Python version on the fly, which is incredibly useful when jumping between projects that rely on different Python releases. It centralizes the control of the default version within the manager's ecosystem.

Understanding the 'pymanager' Alias

While the Python Installation Manager integrates tightly with the py command for convenience and backward compatibility, there might be scenarios where using py could lead to ambiguity. For instance, a virtual environment might define its own py script, or you might have other tools or aliases that conflict with the name py. To address this potential for naming clashes and provide an unambiguous way to invoke the manager, it also offers the alias pymanager.

The pymanager command performs the exact same functions as the py command when interacting with the manager's features. All the commands discussed so far – install, uninstall, list, help – work identically whether you prefix them with py or pymanager. The only difference is the name of the executable you are calling.

Running the Python Installation Manager with the "pymanager" alias instead of "py".
IDG

Using pymanager explicitly clarifies that you intend to interact with the Python Installation Manager tool itself, rather than potentially executing a Python script or another program named py. This can be particularly helpful in complex development environments or scripts where clarity is paramount.

Configuring Windows App Execution Aliases

Windows has a feature called "App execution aliases" (formerly known as App Installer aliases) that allows you to type a command like python or python3 directly into the command prompt, and Windows will automatically launch the appropriate application, often directing you to the Microsoft Store to install Python if it's not found. While this can be convenient for new users, it can sometimes interfere with managing Python versions manually or via tools like the Python Installation Manager.

The Python Installation Manager provides a command to help you manage these Windows-level aliases in conjunction with its own version management. Typing py install --configure will prompt you to review and potentially modify your system's app execution aliases:

The prompt to manage Windows app execution aliases from the Python Installation Manager.
IDG

Responding with 'Y' (or clicking 'Yes' in a potential GUI prompt) will open the relevant section in your Windows Settings. Here, you will see toggles for aliases like python.exe and python3.exe. By default, these might be enabled, directing the commands to the Microsoft Store or a default installation.

Windows app execution aliases pane, showing Python aliases.
IDG

If you intend to rely solely on the Python Installation Manager (using py or pymanager) to launch specific Python versions or the manager's default, it is recommended to toggle these Windows app execution aliases for python.exe and python3.exe off. This ensures that when you type python or python3, Windows doesn't intercept the command and potentially launch a different Python interpreter than the one you intend to use via the manager.

It's important to note that even if you disable these aliases, the Python Installation Manager's own py and pymanager commands will still function correctly, allowing you to access and manage your installed Python versions. This configuration step helps prevent potential conflicts and ensures that the manager has full control over which Python executable is launched when you use its commands.

Special Case: pythonw and pyw Aliases

Finally, it's worth mentioning the aliases pythonw and pyw. These are special-case versions of the Python runtime specifically designed for executing Python scripts that do not require a console window. This is commonly used for GUI applications built with libraries like Tkinter, PyQt, or Kivy, or for background scripts that shouldn't open a command prompt window.

The Python Installation Manager maintains support for these aliases. When you use pyw or pythonw followed by a script name, the manager will launch the script using the appropriate Python interpreter (based on version specifiers or the default), but it will use the windowless executable (pythonw.exe) instead of the standard console executable (python.exe). This behavior is consistent with how these aliases have traditionally worked on Windows and remains valuable for specific types of Python applications.

The Future of Python Management on Windows

The introduction of the Python Installation Manager, and its planned integration as the official tool in Python 3.16, represents a significant improvement for the Windows Python development experience. It addresses the long-standing fragmentation and complexity associated with managing multiple Python versions on the platform. By providing a single, unified command-line interface for installation, uninstallation, listing, and default version selection, the manager streamlines workflows and reduces the potential for configuration errors.

Developers can now more easily maintain isolated environments for different projects, test their code against various Python releases, and keep their Python installations organized and up-to-date. The integration with the existing py command ensures a smooth transition for users already familiar with the legacy launcher, while the pymanager alias offers a robust alternative for avoiding naming conflicts.

As the tool matures and becomes the standard, it is expected to further simplify the onboarding process for new Python developers on Windows and enhance productivity for experienced users. The move towards a centralized, officially supported installation manager aligns Windows with the ease-of-use found in Python environments on other operating systems, solidifying Python's position as a truly cross-platform language with excellent support on Microsoft's flagship operating system.

Getting started with the Python Installation Manager today, even in its pre-release state, allows you to familiarize yourself with the future of Python version management on Windows and take advantage of its streamlined capabilities.