1

C:\Users\my-username\AppData\Local\Programs\Python\Python311\python.exe is in my path but when I execute python in powershell it automatically opens up Microsoft Store which is anyway blocked by the admin.

How do I override the default path, which apparently fires up Windows Store?

Latest Python was installed manually by me:

PS D:\> C:\Users\CURRENT_USER\AppData\Local\Programs\Python\Python311\python.exe
Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
Io-oI
  • 7,588
  • 3
  • 12
  • 41
anjanesh
  • 149
  • 11
  • [Have you installed Python? By default unless you disable the behavior Windows will attempt to install Python from the Windows Store when it’s not installed](https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor/1442940#1442940) – Ramhound Feb 23 '23 at 12:49
  • Yes - edited original post. – anjanesh Feb 23 '23 at 13:36
  • Have you disabled App execution aliases for Python? – Ramhound Feb 23 '23 at 14:20
  • 1
    Does this answer your question? [Typing “python” on Windows 10 (version 1903) command prompt opens Microsoft store](https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor). I was waiting for confirmation you had not disabled Application execution aliases before flagging this question as a duplicate. The answer you recieved forced my hand to flag it sooner – Ramhound Feb 23 '23 at 14:38

1 Answers1

2

Do this :

  • Open "Settings > Apps > Apps & features*
  • Click "App execution aliases"
  • Scroll to the bottom of the list and uncheck the entries for "App Installer - python.exe" and "App Installer - python3.exe".

The effect is immediate.

harrymc
  • 455,459
  • 31
  • 526
  • 924