Share via

Path resolution of python recently stopped working

Anonymous
2021-07-30T07:00:25+00:00

Out of the blue, recently my python.exe path resolution stopped working. I tried investigating, but I'm hopelessly stuck, but here's what I've done:

Open a new command-line.

Try launching python via 'python' - fails, brings up the 'Microsoft Store' with 'Try that again, Page could not be loaded message'. Does NOT run python.

In the same command line verify %path%, I've checked and my python directory 'C:\LegacyApp\Python27' IS included.

In the same command line verify that C:\LegacyApp\Python27\python is executed correctly and runs just fine.

Here I thought what the hell? So I created another test file within C:\LegacyApp\Python27 to see if path resolution for that works. And strangely enough that file (though it surely had a unique name and content) ran just fine.

Anybody else encountered anything like this?

How can it be that path resolution works for some names, and does not for others? (Though rights must clearly be OK, otherwise directly running would not have worked either)

As usual this 'joy' happened just after a windows update...

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2021-07-30T07:13:07+00:00

Executing python forwards me to the python App in the Windows store (3.9). Once installed, it resolves to that latest version of Python.

Python 3.9 in the Microsoft Store

If you want to modify this behavior, take into consideration what is present or installed below and your existing environmental path statements.

Installed Python placeholder prior to installation.

%localappdata%\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe

Additional placeholder after installation

%localappdata%\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0

Installed App location

%Program Files%\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-07-30T07:59:00+00:00

    Hi Techfreak_!

    Thanks for the hint! Insane, how somebody thinks it's a good idea to add established programs to another location with zero length executables to 'force' people into the Microsoft store. Breaking good working installations.

    If somebody else runs into this problem:

    in my case deleting the zero byte python.exe files in both 'c:\Users[user]\AppData\Local\Microsoft\WindowsApps' and 'c:\Users[user]\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe' solved the problem. After that 'junk' was gone, it worked like a charm again!

    Dear Microsoft: please consider a serious ear-twisting for the people involved in this decision to create these super 0 byte executables breaking working installations!

    I recently also found this: Who put Python in the Windows 10 May 2019 Update? | Python (microsoft.com)

    It seems I'm not the only one who thinks this is and was an awful idea causing a lot of pain! Well intended, but awfully implemented!

    Why our company IT rolled this out to my PC yesterday at 8:57 is beyond me...

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments