-1

I have installed python on my computer in the AppData\local\programs\python location on my computer. I got the installation file from the python website. I cannot use the installation packages from the Microsoft store due to an authorization error (even though I unchecked the boxes in the App Execution Aliases page in settings). I am on my personal computer on which there are no other users.

When I go into my command prompt, and run the command:

python --versions

I get an error saying:

Python was not found; run without arguments to install from the Microsoft Store, or
disable this shortcut from Settings > Manage App Execution Aliases.

either I do not understand what this error is requiring me to do, or there is something else I am doing wrong.

Axe319
  • 4,255
  • 3
  • 15
  • 31
Nathan
  • 17
  • 4
  • Have you added it to your `%PATH%`? What does `echo %PATH%` in command prompt give you? – Axe319 Nov 01 '22 at 15:29
  • how can i add it to my PATH? – Nathan Nov 01 '22 at 15:31
  • `Advanced System Settings>Environmental Variables..>Path`. When you type `python` in command prompt Windows looks in your current directory and every directory in `%PATH%` until it finds a `python.exe`. The error is telling you its finding the one in `%LOCALAPPDATA%\Microsoft\WindowsApps` that comes preinstalled on Windows. – Axe319 Nov 01 '22 at 15:34
  • Does this answer your question? ["Register" an .exe so you can run it from any command line in Windows](https://stackoverflow.com/questions/4822400/register-an-exe-so-you-can-run-it-from-any-command-line-in-windows) – wovano Nov 01 '22 at 15:38
  • thank you, the reason it wasn't working was because my python wasn't added to my PATH variable. – Nathan Nov 01 '22 at 15:48

2 Answers2

-2

Try running just "python" in the command prompt. If it doesn't work just install it through https://www.python.org/downloads/.

Himesh A
  • 13
  • 1
  • when i run 'python' it opens the microsoft store, and i have already installed python from that location – Nathan Nov 01 '22 at 15:29
-2

You must add python to global variables.

Jaime
  • 311
  • 2
  • 12