6

After following the instructions on the answer to this quetion, my computer still doesn't recognize python as an internal or external command, operable program or batch file.

I've uploaded a picture for context; what am I doing incorrectly here?enter image description here

EDIT: Here is another picture to show that I am inside path, but the issue seems to be that it won't save the changes I'm making. I copy the correct line in and press enter then press okay, but it's gone when I pull it back up.

Alec Rhea
  • 217

5 Answers5

21

Adding for future reference, as I struggled with this same problem for a while and none of the suggested solutions here or elsewhere fixed the issue for me.

If you have WindowsApps in your path variable then you want to make it is below your Python directory in the list. The reason is WindowsApps contains a python.exe, but it isn't actually python, just a hook to launch Windows Store and search for Python. If WindowsApps appears first in your path variable then Windows will try to use this when you run python from cmd, rather than the python.exe in the directory you have pointed to.

6

Make sure to keep up your python above your windows apps.

Example

MMM
  • 3,257
1

1) get rid of the trailing backslash (notice none of the other entries has one) 2) make sure you open a new command prompt after making changes.

Bill Hileman
  • 802
  • 7
  • 10
1

What am I doing incorrectly here?

You are not saving your changes correctly.

Look at the bottom of the dialog where you are editing. There are OK and Cancel buttons. Press OK. Then OK on the next dialog, etc ... it should be a total of 3 times:

enter image description here

After you have done this open a new cmd prompt and your modified path should show when you type path.

DavidPostill
  • 162,382
1

Just in case changing the order of your path variables didn't fix the issue (it didn't for me) there is a really obscure setting in

Settings -> Apps -> Advanced app settings -> App execution aliases

I needed to also disable python.exe and python3.exe from here to.

Screenshot of settings