在 powershell 中启动 python 时覆盖 Windows 存储打开操作

anj*_*esh 1 python path environment-variables windows-11

C:\Users\my-username\AppData\Local\Programs\Python\Python311\python.exe在我的路径中,但是当我在 powershell 中执行 python 时,它会自动打开 Microsoft Store,无论如何它都会被管理员阻止。

如何覆盖显然会启动 Windows 应用商店的默认路径?

最新的Python是我手动安装的:

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.
Run Code Online (Sandbox Code Playgroud)

har*_*ymc 10

做这个 :

  • 打开“设置 > 应用程序 > 应用程序和功能*
  • 单击“应用程序执行别名”
  • 滚动到列表底部并取消选中“应用程序安装程序 - python.exe”和“应用程序安装程序 - python3.exe”条目。

效果立竿见影。