-1

I am having the same problem as described here: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings

The steps I took were:

  1. Check your Python version and be sure it is installed on your machine

I have python.exe located at C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\python.exe

  1. Check the path environment variable

I added C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\ to the Path variable in the User variables section, then restarted my computer.

  1. Go to -> "start" and type "Manage App Execution Aliases". Go to it and turn off "Python"

I went to the Manage App Execution Aliases window and Python was not listed anywhere.

Where did I go wrong?

Sam
  • 3
  • 2
  • 1
    The path environment variable must contain *folders* not executable paths. You must add `C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64` without the file name... – Serge Ballesta Aug 12 '23 at 21:02
  • Sorry, that was a typo from copying and pasting the text from above. What you described is how I had it. I reinstalled python from python.org and used the "add python to PATH" setting and the issue was resolved. I'm not happy with not understanding why what I did didn't work though :( – Sam Aug 12 '23 at 21:41
  • You didn't properly set the PATH. Since you haven't shown us what you did, only that you claim to have added "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\ to the Path variable in the User variables section" - since it still didn't work, but it then worked when you checked "add python to PATH" when you reinstalled python it worked because now python was on the path. – Elliott Frisch Aug 12 '23 at 21:44
  • I don't use Windows or VS, so take this with a grain of salt, but to me it seems weird that there's a 64-bit version of Python (`_64`) in the 32-bit program files folder, and that you're using VS's copy instead of a separate one. No idea if that's even related to the problem, just wanted to mention. – wjandrea Aug 12 '23 at 21:56
  • "I went to the Manage App Execution Aliases window and Python was not listed anywhere." - *Is this the problem you are asking about*? Or are you saying that you still get the *original error*? Or just *what exactly is the issue*? – Karl Knechtel Aug 13 '23 at 05:10
  • @Elliot Frisch What should I do to show that I've added an environment variable? I accessed System Properties by searching "environment variables" on my start bar, clicking "Environment Variables", clicking "Path" in the listbox that appears under the text "User variables", clicked the button that says "Edit" underneath the same listbox, clicked the "New" button, pasted the folder name, then pressed OK three times. – Sam Aug 17 '23 at 19:16
  • @Karl Knechtel The issue I was having is the one linked in the first sentence. – Sam Aug 17 '23 at 19:16
  • You could go to the command prompt, `echo %PATH%` and paste the command and result into your question. That would be my first choice. My second choice would be a screen shot of that in system properties. But my guess is `echo %PATH%` wouldn't have shown the python folder. I'm not sure if `Path` works. It's `PATH`. – Elliott Frisch Aug 17 '23 at 19:24

0 Answers0