Who put Python in the Windows 10 May 2019 Update?

Steve Dower

Today the Windows team announced the May 2019 Update for Windows 10. In this post we’re going to look at what we, Microsoft’s Python team, have done to make Python easier to install on Windows by helping the community publish to the Microsoft Store and, in collaboration with Windows, adding a default “python.exe” command to help find it. You may have already heard about these on the Python Bytes podcast, at PyCon US, or through Twitter.

As software moves from the PC to the cloud, the browser, and the Internet of Things, development workflows are changing. While Visual Studio remains a great starting point for any workload on Windows, many developers now prefer to acquire tools individually and on-demand.

For other operating systems, the platform-endorsed package manager is the traditional place to find individual tools that have been customized, reviewed, and tested for your system. On Windows we are exploring ways to provide a similar experience for developers without impacting non-developer users or infringing publishers’ ability to manage their own releases. The Windows Subsystem for Linux is one approach, offering developers consistency between their build and deployment environments. But there are other developer tools that also matter.

One such tool is Python. Microsoft has been involved with the Python community for over twelve years, and currently employ four of the key contributors to the language and primary runtime. The growth of Python has been incredible, as it finds homes among data scientists, web developers, system administrators, and students, and roughly half of this work is already happening on Windows. And yet, Python developers on Windows find themselves facing more friction than on other platforms.

Installing Python on Windows

The Windows command prompt showing an error when Python cannot be foundIt’s been widely known for many years that Windows is the only mainstream operating system that does not include a Python interpreter out of the box. For many users who are never going to need it, this helps reduce the size and improve the security of the operating system. But for those of us who do need it, Python’s absence has been keenly felt.

Once you discover that you need to get Python, you are quickly faced with many choices. Will you download an installer from python.org? Or perhaps a distribution such as Anaconda? The Visual Studio installer is also an option. And which version? How will you access it after it’s been installed? You quickly find more answers than you need, and depending on your situation, any of them might be correct.

We spent time figuring out why someone would hit the error above and what help they need. If you’re already a Python expert with complex needs, you probably know how to install and use it. It’s much more likely that someone will hit this problem the first time they are trying to use Python. Many of the teachers we spoke to confirmed this hypothesis – students encounter this far more often than experienced developers.

So we made things easier.

The header of the Python 3.7 page in the Microsoft Store

First, we helped the community release their distribution of Python to the Microsoft Store. This version of Python is fully maintained by the community, installs easily on Windows 10, and automatically makes common commands such as python, pip and idle available (as well as equivalents with version numbers python3 and python3.7, for all the commands, just like on Linux).

The Windows command prompt showing that "python3.7" now launches Python and "pip3" launches pip

Finally, with the May 2019 Windows Update, we are completing the picture. While Python continues to remain completely independent from the operating system, every install of Windows will include python and python3 commands that take you directly to the Python store page. We believe that the Microsoft Store package is perfect for users starting out with Python, and given our experience with and participation in the Python community we are pleased to endorse it as the default choice.

Scott Hanselman on Twitter: "WHOA. I'm on a new copy of Windows and I typed Python - on a machine where I don't have it - and it launched the Windows Store into an official distribution I can install in a click. WHEN did this happen. I love this."We hope everyone will be as excited as Scott Hanselman was when he discovered it. Over time, we plan to extend similar integration to other developer tools and reduce the getting started friction. We’d love to hear your thoughts, and suggestions, so feel free to post comments here or use the Windows Feedback app.

 

70 comments

Discussion is closed. Login to edit/delete existing comments.

  • Brian W 0

    Great work!  Any chance of getting Ansible working natively without WSL?  Microsoft makes VSCode and the Ansible extension, so I hope this is on the roadmap.

  • Andrew Boyd 0

    permission problems running install from WindowsStore
    python -m pip install –upgrade pipCollecting pipDownloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)100% |████████████████████████████████| 1.4MB 3.2MB/sInstalling collected packages: pipFound existing installation: pip 19.0.3Uninstalling pip-19.0.3:Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: ‘c:\\program files\\windowsapps\\pythonsoftwarefoundation.python.3.7_3.7.1264.0_x64__qbz5n2kfra8p0\\lib\\site-packages\\pip-19.0.3.dist-info\\entry_points.txt’Consider using the `–user` option or check the permissions.

    python –user andrewb -m pip install –upgrade pipunknown option –userusage: python [option] … [-c cmd | -m mod | file | -] [arg] …Try `python -h’ for more information.

    • Steve DowerMicrosoft employee 0

      Hi, yes, this is a known issue. We’re waiting on pip to make a release that can be bundled with the next version of Python to fix it.

      Until then, use the “pip” command directly, or use “python -m pip install –user …”.

  • Joan Canals Gil 0

    Very nice but …
    from PyQt5 import QtWidgets, QtCoreImportError: DLL load failed: The specified module could not be found.

    • Steve DowerMicrosoft employee 0

      This is something that PyQt will have to fix (see this item in the 3.8 release notes, which also applies to 3.7 from the Store). Numpy and scipy have already fixed it.

      Unfortunately the best workaround until PyQt fixes it is to install Python from python.org instead.

    • Carel Combrink 0

      FYI: It seems like PySide2 is not affected by this, perhaps it is an option instead of PyQt5

  • Jeff Ratcliff 0

    Just successfully installed the May 2019 Windows Update but python, python3, and python3.7 are still unrecognized commands. Perhaps this added feature only applies to a prerelease insider build. It’s also an easy mistake to make if one is a developer and has altered the PATH for python sometime in the past before installing the update.

    • Steve DowerMicrosoft employee 0

      We deliver the commands through a store app (“App Installer”), and those update in a second background step via the Microsoft Store app (or you can go there and force it).

      In most cases, it’ll happen quickly enough that you won’t notice, but immediately after upgrading you might. Probably by now it’ll be there for you 🙂

  • Zhe Li 0

    I installed Python from the Microsoft Store shortly after a fresh installation of Windows 10, and found that python says MSVCP140.dll is missing. Obviously the store version does not check if VC++ 2015 redistributables are installed (while the python.org installer does). Something you should improve on.

    • Steve DowerMicrosoft employee 0

      Yes, the CPython team has already fixed this. They’ll be releasing an update that will remove the dependency with 3.7.5.

      The python.org installer does not have this issue – neither of them will install the DLL.

      • abhishek_simhadri@outlook.com 0

        Hi Steve

        I purchased a Lenovo Flex laptop which has Windows 10s. I tried to install Python 3.7 and Ubuntu 18 from the Microsoft appstore. Both are not working. The same MSVCP140.dll issue (mentioned by Zhe above).

        Do I have to move from Windows 10S to the regular Windows 10? Is it not possible to setup a dev environment on Windows 10S?

  • webtestmay4@gmail.com 0

    Thanks for sharing it. nice information.its really helpful.
    python training in pune

  • Karl O. Feger 0

    Is there any idea out there, where the cobde 0x80070005 in the store comes from when trying to install Python on my 10Pro-machine? Google didn’t help on this.

    • Steve DowerMicrosoft employee 0

      Hi Karl. I saw this myself yesterday, and I believe Windows is having trouble replacing the existing shortcuts. I was able to work around it by opening “Manage App Execution Aliases” and disabling the existing python.exe and python3.exe items there before installing.

      This looks like a new OS bug, and we’re investigating. If you are able to confirm it works for you after disabling the shortcuts then that would be helpful.

      • Pekka Johansson 0

        Disabling the pre-existing aliases worked for me and I was finally able to install 3.8 version. I had to go back and switch on the new aliases created by the installer to make everything work.

  • biz1@jondart.name 0

    So I go to install Python 3.8 from the Microsoft Store, and first it asks me to login, and then it asks for my name and birthdate. WTF do you need this info for? I am going to python.org and install it. You need to straighten out your privacy policies.

    • Steve DowerMicrosoft employee 0

      Signing into the Store with a Microsoft Account helps transfer your apps and settings between machines, but it is optional for free apps.

      If you cancel it, you will still be allowed to install Python.

  • 帆 杨 0

    THE ones who put it in windows store should be shame on themselves. Why put it in the PATH?

    • jessica bowman 0

      Thanks for share this information……… about Who put Python in the Windows 10 May 2019 Update?
      https://errorslab.com

    • Wil Wilder Apaza Bustamante 0

      Killing half a day on fixing my old scripts building Qt (working for ~5 years), just because Windows 10 update decided to put broken python.exe into PATH!
      Yeah, shame on these guys!

      Recalls the days, when somebody thought that putting Cygwin into PATH would be very clever and helpful…

  • Alcides Neto 0

    Great idea, now you fucked up my Anaconda install and I cannot fix the “import numpy” problem. I did everything to resolve, it but nothing works! Thank you so much M$ I will try some distro like Mint to work with python. You screw up again.

Feedback usabilla icon