Fixing Python on Windows 10 – #SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

The other day I picked up a laptop, opened a command prompt and typed “python” to check something. I got this:

2021-02-04 17_52_35-Microsoft Store

I did have Python 3.8 installed, so upgrading to 3.9 wasn’t out of the question. However, why did this come up?

I searched around and found out that Windows sets up application aliases for some versions. I can only assume since I had python on here that some update last fall did this and I hadn’t used this laptop for python because I’m stuck at home.

I saw this on SO as an issue, and followed the instructions. I used Win+I to open the control panel. Here I typed “apps and” to get to Apps and Features.

2021-02-04 17_56_28-Settings

In here, I see there are “App execution aliases” as a link.

2021-02-04 17_56_57-Settings

In here, I see that both Python.exe and Python3.exe are set as aliases.

2021-02-04 17_57_38-Settings

I turned these last two off and then when I type “python,” I get what I want.

2021-02-04 17_58_14-cmd - python


I wrote this as many of us run into silly issues, and while I found that SO article quickly, you might not. Your search terms might be different, or the search engine might give you different results. This might help you get setup quickly with Python, which is becoming more useful for data professionals.

This took my about 5 minutes to type up and grab a few screenshots.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , , . Bookmark the permalink.

2 Responses to Fixing Python on Windows 10 – #SQLNewBlogger

  1. dave wentzel says:

    fwiw, running python on windows sucks. It gets worse if you have an app that needs python 2.7, your methods above don’t work. My sincere advice is to do any python work in a linux-based docker container where you can control everything and it’s reproducible on anyone’s machine, whether windows, linux, or whatever.


  2. way0utwest says:

    I don’t work with Python < 3.x, and Windows is my default. Using a container is an interesting idea, however. I may have to play with that.


Comments are closed.