Overview

It’s been widely known for many years that Windows is the only mainstream operating system that has not included a Python interpreter out of the box. For many users who are never going to need it, this helps reduce the size and improves the security of the operating system. But for those of us who would like to use it, Python’s absence has been keenly felt.

The Windows 10 May 2019 Update

With the May 2019 update to WIndows 10, there are two methods to get Python 3.7 on your computer. There is a community release of Python 3.7 in the Microsoft Store. This will be the default choice for getting Python if you are looking for an easy install separate than those on the Internet.

Second, every install of Windows starting with the May 2019 update will include python and python3 commands that take you directly to the Python store page.

This tutorial will help you through these options.

This tutorial is based, in part, on an excellent Microsoft blog post "Who put Python in the Windows 10 May 2019 Update?" at https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/ by Steve Dower.

Upgrading Windows 10

You can check your version of Windows 10 by clicking the Start icon in the lower left of the screen, click the gear icon (Settings) then Update and Security then on the right "OS build info". You should get a screen similar to that above.  See the version and date under Windows Specifications.

You will need the May 2019 Update (or better) to get the features used in this article. Directly upload the update by going to https://www.microsoft.com/en-us/software-download/windows10. Click the Update now button to get the update. This saves time over looking to update from the Settings.

The update process will take some time. You can continue to work during the download process but save your work before agreeing to install. The PC will reboot several times during the installation.

When complete, check the OS version again as described at the top of this page and ensure it is 18362.145 or higher.

The Python App

If you've found the Microsoft (app) Store, you know how convenient it is. If you haven't used it yet, we'll show you how.

Click the Start button, lower left of the screen and find the Microsoft Store tile, a shopping bag with the Windows four pane logo on it. Clock the time.

 

If you don't see the icon, in the search bar at the bottom, type "Microsoft Store" and it should be a top result.

The Microsoft Store window will pop up similar to the one at left.

Click Search then type "Python". Python 3.7 should be the first one, select that.

The app window shown at the top of this guide page will pop up. 

The app is free. Click the Get button - unless you have a "See System Requirements" link below the Get button - it's likely you need to upgrade WIndows 10 as shown on the previous page of this guide.

 

Use

The program will install two ways to get to Python. The first is a command line version in a Windows command prompt.

You are placed in a REPL and can type "help" to see the commands available.

To close the window (you will lose your work if unsaved) type "exit()"

IDLE

IDLE is the Python 3 official editor.

IDLE also shows the Python 3.7 REPL but has menu commands at top allowing you to do a number of actions. This may be the best mode to use Python until you are familiar with things.

Command Line Python

If you are unfamiliar with the Windows Command Prompt, you are not alone. Windows designers have made its use rare for non-programmers. But it remains a very useful tool for working with programs like Python (so much so, the author created a tile for it on the right above).

To access the command line, open the Start Menu via clicking the Start Button, lower left of the screen. Scroll the left side all the way down to Windows System - click the icon and sub menu items pop in, select Command Prompt with the black icon.

Unlike the Python app noted in the previous page, the Command Prompt does not put you in a REPL or IDLE. It is the Windows command line and you can perform many system functions. It is handy to know where to find the Command Prompt for system administration.

Python

You can access Python in the Command Line by just typing Python3.7. You will then get the familiar REPL prompt.

If you have not used Python before this and not installed the app as on the previous page, typing python may take you to the Microsoft Store to download the components. Follow the previous page if it does so.

IDLE

Typing the word idle in the command prompt runs the IDLE Python editor, just like installing the app on the previous page. Rather than showing up in the command prompt window, a new IDLE window will appear (see image below).

pip3

The pip package manager is available for this install of Python as well, pip opens up a world of open source packages to install for your projects.

Typing pip3 list will list the currently installed packages. Consult the pip documentation (available at the link below) on all the commands used to work with packages with pip.

Wrap-Up

Windows 10 May 2019 update opens up a new, world of Python 3 on Windows.

If you want to learn more about using Python, go to python.org, where you can find documentation, community and more. 

Documentation for Python's standard library, along with tutorials and guides, are available at docs.python.org.

Have fun!

This guide was first published on Jun 03, 2019. It was last updated on Jun 03, 2019.