Python and Windows get cozier

Microsoft makes it easy to install and use Python in Windows and in Visual Studio Code

Python and Windows get cozier
Thinkstock

If you ever complained that Windows was the only major operating system not to ship with Python, it’s time to stop complaining. It may not be in the installer, but it’s now an official part of Windows, as an optional feature. The third most popular language (according to analyst firm RedMonk’s regular programming language survey) has finally become a first-class citizen.

Microsoft is using Python to experiment with a new way of installing and deploying Windows features, using the Microsoft Store as a host. In the past you had to go to the Store, search for an app or package, and then install it. This new method is a lot simpler. Getting Python into Windows is now only a matter of typing python at a Windows command line and installing the Windows Store Python package. Instead of being purely a way to install apps, Microsoft is treating the Store as a package manager, much like the familiar tools in many Linux distributions, including those running on WSL (Windows Subsystem for Linux).

Installing Python from the command line

The new installation method rolled out with the 1904 release of Windows 10 in May 2019. The Store package for Python is based on the community distribution of Python 3.7, optimized for interactive and educational use. If you want an alternative distribution, you can install it via the standard Windows Python installer, or with bundled installers such as Anaconda, or via Visual Studio’s data science and machine learning tools. Microsoft worked with the Python release team to develop a Store package, providing new tools in Windows to launch the Store when a user types python on a machine that’s not been configured with the language.

If you’ve already installed Python and added it to your Windows PATH, then the new installation feature won’t run, and the python command will launch your existing Python environment. This will ensure that the Microsoft Store release can’t overwrite the settings.

To continue reading this article register now