python is not recognized windows 10

55,323

Solution 1

Make sure the path is in your System PATH variable and not in a User PATH variable. After adding the path to the PATH variable, make sure you close and re-open any command prompts so they use the updated PATH.

You should also confirm the path by checking python directly from the folder.

The example below is for the OP's path.

Make sure you use the path specific to your installation:

  1. %USERPROFILE%\AppData\Local\Programs\Python\Python36

  2. %USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts for access to tools such as PIP

  3. %USERPROFILE%\AppData\Local\Programs\Python\Launcher

    cd c:\Python\Python36-32

    python --version

or using CMD or Powershell on Windows: \>Python --version should print Python 3.x.x where x = version specific numbers.

Solution 2

I had the same problem, due to a stupid decision from Microsoft.

I had another line in my system path variable: C:\Users\MyUserName\AppData\Local\Microsoft\WindowsApps

And windows 10 put there a python.exe file that only redirected me to the python page of the Microsoft Store: enter image description here

Since this line was above my true python path, typing python in the cmd prompt opened the Microsoft Store...

Solution:

Type App execution aliases in the windows 10 search bar, then uncheck the aliases for python.exe and python3.exe. More information here

Solution 3

If still not working, as mentioned above in the answers, then simply move up the path, as shown in the screenshot.

image here

Solution 4

you get this error because the python.exe path has not been added to the System environment variable to do that simply

  1. go to the path C:\Users\%Username%\AppData\Local\Programs\Python\Python37-32 which contains python.exe

  2. copy the path and open system environment variables and in the variable section look for variable called Path if not create new variable with Variable Name as Path and value as the copied path

enter image description here

  1. once you do that close the window and simply open cmd and type python you should get something like this

enter image description here

Solution 5

If you are trying to install new python version python-3.9.6 then click the checkbox of Add Python 3.9 to PATH

enter image description here

Share:
55,323
Rishabh Mandayam
Author by

Rishabh Mandayam

Updated on December 18, 2021

Comments

  • Rishabh Mandayam
    Rishabh Mandayam over 2 years

    I recently installed Python 3.6.3 on my device. When I type python in my cmd, it gives me this error. I do have the PATH in the environment variables. Path Lists. This should normally fix it but python is still not recognized.